finish addedit
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
xmlns:custom="clr-namespace:LoadingSpinnerControl;assembly=LoadingSpinnerControl"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -76,24 +76,23 @@
|
||||
IsEditable="True"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Width="150"
|
||||
Width="200"
|
||||
FontSize="16"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalAlignment="Left">
|
||||
<ComboBoxItem Content="Halle"></ComboBoxItem>
|
||||
<ComboBoxItem Content="im Freien"></ComboBoxItem>
|
||||
<ComboBoxItem Content="Feld"></ComboBoxItem>
|
||||
<ComboBoxItem Content="3 D"></ComboBoxItem>
|
||||
HorizontalAlignment="Left"
|
||||
Loaded="ComboBox_Loaded"
|
||||
SelectionChanged="ComboBox_SelectionChanged">
|
||||
</ComboBox>
|
||||
|
||||
<Image x:Name="CompetitionImage"
|
||||
<Image Name="CompetitionImage"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Grid.RowSpan="2"
|
||||
Height="80"
|
||||
Width="80"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0 0 80 0"/>
|
||||
Margin="0 0 80 0"
|
||||
Source="{Binding CompetitionImage, Mode=TwoWay, TargetNullValue={x:Null}}" />
|
||||
|
||||
<DatePicker SelectedDateFormat="Long"
|
||||
Grid.Row="3"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Apollon.Domain.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -22,8 +23,38 @@ namespace Apollon.WPF.Views.Components
|
||||
{
|
||||
public AddEditDetails()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void ComboBox_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
List<string> competitions = new List<string>()
|
||||
{
|
||||
"Halle", "im Freien", "Feld", "3D"
|
||||
};
|
||||
ComboBox.ItemsSource = competitions;
|
||||
}
|
||||
|
||||
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
|
||||
if (ComboBox.SelectedIndex == 0)
|
||||
{
|
||||
CompetitionImage.Source = new BitmapImage(new Uri(@"D:\Projekte\Apollon\Apollon\Apollon.WPF\Images\TargetHall.png"));
|
||||
}
|
||||
if (ComboBox.SelectedIndex == 1)
|
||||
{
|
||||
CompetitionImage.Source = new BitmapImage(new Uri("D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\Images\\TargetField.png"));
|
||||
}
|
||||
if (ComboBox.SelectedIndex == 2)
|
||||
{
|
||||
CompetitionImage.Source = new BitmapImage(new Uri("D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\Images\\TargetOutdoor.png"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Apollon.WPF.Views.Components"
|
||||
xmlns:converter="clr-namespace:Apollon.WPF.Views.Components"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Border BorderBrush="#0000a0"
|
||||
BorderThickness="1"
|
||||
@@ -92,19 +93,20 @@
|
||||
</TextBlock>
|
||||
<Image Grid.Column="2"
|
||||
Grid.Row="2"
|
||||
Source="D:\Projekte\Apollon\Apollon\Apollon.WPF\Images\TargetField.png"
|
||||
Source="{Binding CompetitionImage}"
|
||||
Width="50"
|
||||
Height="50">
|
||||
Height="50">
|
||||
<Image.Style>
|
||||
<Style TargetType="Image">
|
||||
<Style TargetType="Image">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
|
||||
</Image>
|
||||
</WrapPanel>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user