combobox selcted image finish
This commit is contained in:
@@ -7,6 +7,13 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="images\3d.png" />
|
||||||
|
<None Remove="images\targetField.png" />
|
||||||
|
<None Remove="images\targetHall.png" />
|
||||||
|
<None Remove="images\targetOutdoor.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="LoadingSpinner.WPF" Version="1.0.0" />
|
<PackageReference Include="LoadingSpinner.WPF" Version="1.0.0" />
|
||||||
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="4.11.0" />
|
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="4.11.0" />
|
||||||
@@ -22,4 +29,19 @@
|
|||||||
<Folder Include="Images\Logos\" />
|
<Folder Include="Images\Logos\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="images\3d.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="images\targetField.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="images\targetHall.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="images\targetOutdoor.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -27,7 +27,10 @@
|
|||||||
<Setter Property="Background" Value="#ff8000"/>
|
<Setter Property="Background" Value="#ff8000"/>
|
||||||
<Setter Property="Opacity" Value="0.8"/>
|
<Setter Property="Opacity" Value="0.8"/>
|
||||||
<Setter Property="Foreground" Value="#0000a0"/>
|
<Setter Property="Foreground" Value="#0000a0"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.5"/>
|
||||||
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -72,6 +74,21 @@ namespace Apollon.WPF.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Competition _currentCompetition;
|
||||||
|
public Competition CurrentCompetition
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _currentCompetition;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_currentCompetition = value;
|
||||||
|
CompetitionImage = _currentCompetition.CompetitionImage;
|
||||||
|
OnPropertyChanged(nameof(CurrentCompetition));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private DateTime _startDate = DateTime.Today;
|
private DateTime _startDate = DateTime.Today;
|
||||||
public DateTime StartDate
|
public DateTime StartDate
|
||||||
{
|
{
|
||||||
@@ -179,23 +196,23 @@ namespace Apollon.WPF.ViewModels
|
|||||||
new Competition
|
new Competition
|
||||||
{
|
{
|
||||||
CompetitionName = "Halle",
|
CompetitionName = "Halle",
|
||||||
CompetitionImage = "targetHall.png"
|
CompetitionImage = @"\Images\targetHall.png"
|
||||||
},
|
},
|
||||||
new Competition
|
new Competition
|
||||||
{
|
{
|
||||||
CompetitionName = "im Freien",
|
CompetitionName = "im Freien",
|
||||||
CompetitionImage ="targetOutdoor.png"
|
CompetitionImage = @"\Images\targetOutdoor.png"
|
||||||
},
|
},
|
||||||
new Competition
|
new Competition
|
||||||
{
|
{
|
||||||
CompetitionName = "Feld",
|
CompetitionName = "Feld",
|
||||||
CompetitionImage = "targetField.png"
|
CompetitionImage = @"\Images\targetField.png"
|
||||||
},
|
},
|
||||||
|
|
||||||
new Competition
|
new Competition
|
||||||
{
|
{
|
||||||
CompetitionName = "3D",
|
CompetitionName = "3D",
|
||||||
CompetitionImage = "3d.png"
|
CompetitionImage = @"\Images\3d.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
xmlns:ViewModels="clr-namespace:Apollon.WPF.ViewModels" x:Class="Apollon.WPF.Views.Components.AddEditDetails"
|
xmlns:ViewModels="clr-namespace:Apollon.WPF.ViewModels" x:Class="Apollon.WPF.Views.Components.AddEditDetails"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="55"/>
|
<RowDefinition Height="55"/>
|
||||||
@@ -81,7 +81,10 @@
|
|||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
ItemsSource="{Binding CompetitionList}"
|
ItemsSource="{Binding CompetitionList}"
|
||||||
DisplayMemberPath="CompetitionName">
|
DisplayMemberPath="CompetitionName"
|
||||||
|
SelectedValuePath="CompetitionName"
|
||||||
|
SelectedValue="{Binding CurrentCompetition.CompetitionName}"
|
||||||
|
SelectedItem="{Binding CurrentCompetition}">
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<Image x:Name="CompetitionImage"
|
<Image x:Name="CompetitionImage"
|
||||||
@@ -92,7 +95,7 @@
|
|||||||
Width="80"
|
Width="80"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Margin="0 0 80 0"
|
Margin="0 0 80 0"
|
||||||
Source="{Binding CompetitionImage, Mode=TwoWay, TargetNullValue={x:Null}}" />
|
Source="{Binding CompetitionImage, TargetNullValue={x:Null}}" />
|
||||||
|
|
||||||
<DatePicker SelectedDateFormat="Long"
|
<DatePicker SelectedDateFormat="Long"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
@@ -154,7 +157,10 @@
|
|||||||
Width="120"
|
Width="120"
|
||||||
Height="35"
|
Height="35"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
IsEnabled="{Binding CanSubmit}"/>
|
IsEnabled="{Binding CanSubmit}"
|
||||||
|
ToolTip="Turniername muss angegeben werden!"
|
||||||
|
ToolTipService.ShowOnDisabled="True"
|
||||||
|
ToolTipService.BetweenShowDelay="1000"/>
|
||||||
|
|
||||||
<Button Content="Abbrechen"
|
<Button Content="Abbrechen"
|
||||||
Command="{Binding CancelCommand}"
|
Command="{Binding CancelCommand}"
|
||||||
|
|||||||
Reference in New Issue
Block a user