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