<
trk:RadGridView
x:Name
=
"tblSanctDecisMed"
Height
=
"130"
trkT:StyleManager.Theme
=
"Windows7"
AutoGenerateColumns
=
"False"
RowIndicatorVisibility
=
"Visible"
Width
=
"682"
Margin
=
"10"
HorizontalAlignment
=
"Left"
ScrollViewer.VerticalScrollBarVisibility
=
"Visible"
ReorderColumnsMode
=
"None"
ShowGroupPanel
=
"false"
ItemsSource
=
"{Binding Path=MembresEquipe}"
CanUserDeleteRows
=
"False"
CanUserFreezeColumns
=
"False"
CanUserInsertRows
=
"True"
CanUserReorderColumns
=
"False"
CanUserSortColumns
=
"True"
ShowInsertRow
=
"True"
IsBusy
=
"False"
IsScrolling
=
"False"
>
<
trk:RadGridView.Columns
>
<
trk:GridViewDataColumn
Header
=
"Matricule"
Width
=
"125"
DataMemberBinding
=
"{Binding Path=NoMatricule}"
IsFilterable
=
"False"
IsGroupable
=
"False"
/>
<
trk:GridViewDataColumn
Header
=
"Nom/Prénom"
Width
=
"*"
DataMemberBinding
=
"{Binding Path=NomEmploye}"
IsFilterable
=
"False"
IsGroupable
=
"False"
IsReadOnly
=
"True"
/>
</
trk:RadGridView.Columns
>
</
trk:RadGridView
>
foreach (MapShape shape in this.InformationLayer.Items)
{
string name = (string)shape.ExtendedData.GetValue("NAME");
TextBlock lblCounty = new TextBlock();
//lblCounty.Text = name.Substring(0, 2);
lblCounty.Text = name;
lblCounty.FontFamily = new FontFamily("Arial");
lblCounty.FontSize = 9.5;
if (name.ToLower().Equals("perry"))
{
RotateTransform rotateTransform;
double newRotation = -20.00;
rotateTransform = new RotateTransform(newRotation);
lblCounty.RenderTransform = rotateTransform;
}
MapLayer.SetLocation(lblCounty, shape.GeographicalBounds.Center);
MapLayer.SetHotSpot(lblCounty, hotSpot);
this.LabelLayer.Items.Add(lblCounty);
<UserControl x:Class="gcm.module.consultation.CreationMotifView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:infrastructure="clr-namespace:gcm.infrastructure;assembly=gcm.infrastructure"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<UserControl.Resources>
<DataTemplate x:Key="IconTemplate">
<Image Source="/gcm.resources;component/images/16/Motif.png"
Stretch="None" />
</DataTemplate>
</UserControl.Resources>
<telerikNavigation:RadWindow x:Name="window" Header="{x:Static infrastructure:Message.Popup_Motif_header}" WindowStartupLocation="CenterOwner" Margin="10,40,10,10" Height="135" Width="450"
TopOffset="-50" ResizeMode="NoResize"
IconTemplate="{StaticResource IconTemplate}">
<Grid>
<Grid.Resources>
<DataTemplate DataType="{x:Type ValidationError}">
<TextBlock
FontStyle="Italic"
Foreground="Red"
HorizontalAlignment="Right"
Margin="0,1"
Text="{Binding Path=ErrorContent}"
/>
</DataTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="1" Name="LibelleMotif" Content="{x:Static infrastructure:Message.Motif_Libelle}"></Label>
<TextBox Grid.Column="1" Grid.Row="1" Name="TxtMotif"
Text="{Binding Path=txtMotif, ValidatesOnDataErrors=true, UpdateSourceTrigger=PropertyChanged}"
Height="23" Margin="0,0,35,0" VerticalAlignment="Top" TabIndex="0" />
<ContentPresenter Grid.Row="1" Grid.Column="5"
HorizontalAlignment="Left" VerticalAlignment="Top"
Content="{Binding ElementName=TxtMotif, Path=(Validation.Errors).CurrentItem}"
DockPanel.Dock="Right"/>
<Button Grid.Column="2" Grid.Row="2" Name="valider" Margin="0,0,33,9"
Command="{Binding Path=MotifCommande}" TabIndex="1" >valider</Button>
</Grid>
</telerikNavigation:RadWindow>
</UserControl>
Presenter :
public ICommand MotifCommande
{
get
{
if (this.mode == ModeNames.UPDATE)
{
if (_updateCommand == null)
{
_updateCommand = new RelayCommand(
param => this.updateMotif(),
param => this.CanSaveMotif
);
}
return _updateCommand;
}
else
{
if (_saveCommand == null)
{
_saveCommand = new RelayCommand(
param => this.createMotif(),
param => this.CanSaveMotif
);
}
return _saveCommand;
}
}
}
public void createMotif()
{
try
{
Motif motif = this.GetMotif();
_motifRepository.CreateMotif(motif);
this.View.window.Close();
consultationController.MotifCreated(motif);
}
catch (Exception)
{
}
}
bool CanSaveMotif
{
get
{
return true;
}
}
any idea?