This commit is contained in:
Daniele Bariletti
2025-02-13 10:08:02 +01:00
18 changed files with 251 additions and 95 deletions
+19 -11
View File
@@ -7,19 +7,28 @@ Public Class ParametricCompoVM
#Region "FIELDS & PROPERTIES"
Private ReadOnly sLuaPath As String = String.Empty
Private m_sLuaPath As String = String.Empty
Friend ReadOnly bFileExsist As Boolean = False
Private m_nVeinCtx As Integer
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New(sFile As String)
Sub New(sFile As String, nVeinCtx As Integer)
MyBase.New()
m_nVeinCtx = nVeinCtx
Title = EGT_PARAMETRIC.ToUpper()
' Recupero path cartella che contiene i componenti
GetMainPrivateProfileString(K_COMPO, COMPO_DIR, "", sLuaPath)
sLuaPath &= sFile
LoadParamList()
GetMainPrivateProfileString(K_COMPO, COMPO_DIR, "", m_sLuaPath)
' Controllo se il file esiste
m_sLuaPath &= sFile
If File.Exists(m_sLuaPath) Then
LoadParamList()
bFileExsist = True
Else
EgtOutLog("File " & m_sLuaPath & " non esiste nella cartella dei componenti")
End If
' aggiorno visualizzazione
EgtSetView(VT.TOP, False)
EgtZoom(ZM.ALL)
@@ -32,7 +41,7 @@ Public Class ParametricCompoVM
Public Overrides Sub LoadParamList()
' Pulisco lista variabili
ParamList.Clear()
EgtLuaExecFile(sLuaPath)
EgtLuaExecFile(m_sLuaPath)
Dim sPar As String = "0"
EgtLuaGetGlobStringVar("CMP.Npar", sPar)
Dim sName As String = String.Empty
@@ -49,14 +58,13 @@ Public Class ParametricCompoVM
End Sub
Private Sub ExecLua()
Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
If Not File.Exists(sLuaPath) Then
EgtOutLog("Matching error: missing file (" & sLuaPath & ")")
If Not File.Exists(m_sLuaPath) Then
EgtOutLog("Matching error: missing file (" & m_sLuaPath & ")")
Return
End If
' Parsing
EgtLuaExecFile(sLuaPath)
EgtSetCurrentContext(nVeinCtx)
EgtLuaExecFile(m_sLuaPath)
EgtSetCurrentContext(m_nVeinCtx)
For Index As Integer = 0 To ParamList.Count - 1
If TypeOf ParamList(Index) Is _TextBoxParam Then
Dim _TextBox As _TextBoxParam = DirectCast(ParamList(Index), _TextBoxParam)
+17 -3
View File
@@ -118,9 +118,15 @@
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="GridPanel\GridDimensionPanelV.xaml.vb">
<DependentUpon>GridDimensionPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="GridPanel\GridPanelVM.vb" />
<Compile Include="GridPanel\GridPaneV.xaml.vb">
<DependentUpon>GridPaneV.xaml</DependentUpon>
<Compile Include="GridPanel\GridPanelV.xaml.vb">
<DependentUpon>GridPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="GridPanel\GridViewPanelV.xaml.vb">
<DependentUpon>GridViewPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow\MainWindowV.xaml.vb">
<DependentUpon>MainWindowV.xaml</DependentUpon>
@@ -240,7 +246,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="GridPanel\GridPaneV.xaml">
<Page Include="GridPanel\GridDimensionPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="GridPanel\GridPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="GridPanel\GridViewPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+35
View File
@@ -0,0 +1,35 @@
<Grid x:Class="GridDimensionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
Margin="0,10,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Content="{Binding MeasureUnit}"
ToolTip="{Binding MeasureUnit_Msg}"
Command="{Binding StatusUnitsCommand}"
Style="{StaticResource GridPanel_Btn}"/>
<Button Grid.Row="1"
Name="GridDimensionBtn"
Command="{Binding ShowPopUpCommand}"
Style="{StaticResource Grid_Btn}">
<EgtStone3D:SVGV FileSource="{Binding FileGridDimSVG, UpdateSourceTrigger=PropertyChanged}"/>
</Button>
<Popup IsOpen="{Binding IsOpenGridDimension}"
AllowsTransparency="True"
PopupAnimation="Scroll"
StaysOpen="False"
PlacementTarget="{Binding ElementName=GridDimensionBtn}">
<TextBox Text="{Binding GridDimensionText, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GridPanel_TextBox}">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding GridDimensionCommand}"/>
</TextBox.InputBindings>
</TextBox>
</Popup>
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class GridDimensionPanelV
End Class
-37
View File
@@ -1,37 +0,0 @@
<WrapPanel x:Class="GridPaneV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource GridPanel_WrapPanel}">
<UniformGrid Columns="2">
<Button ToolTip="{Binding ZoomAllToolTip}"
Command="{Binding ZoomAllCommand}"
Style="{StaticResource Proj_Btn}">
<Image Source="/Resources/GridViewPanel/ZoomAll.png"
Style="{StaticResource Proj_Img}"/>
</Button>
<Button Content="{Binding StatusGridText}"
Command="{Binding StatusGridCommand}"
Style="{StaticResource Grid_Btn}"/>
</UniformGrid>
<UniformGrid Columns="2">
<TextBlock Text="Grid" Style="{StaticResource GridPanel_TxBl}"/>
<TextBox Text="{Binding GridDimensionText, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource GridPanel_TextBox}">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding GridDimensionCommand}"/>
</TextBox.InputBindings>
</TextBox>
</UniformGrid>
<UniformGrid Columns="2"
Style="{StaticResource GridPanel_UniformGrid}">
<TextBlock Text="{Binding MeasureUnit_Msg}"
Style="{StaticResource GridPanel_TxBl}"/>
<Button Content="{Binding MeasureUnit}"
Command="{Binding StatusUnitsCommand}"
Style="{StaticResource GridPanel_Btn}"/>
</UniformGrid>
</WrapPanel>
-3
View File
@@ -1,3 +0,0 @@
Public Class GridPaneV
End Class
+13
View File
@@ -0,0 +1,13 @@
<WrapPanel x:Class="GridPaneV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
Style="{StaticResource GridPanel_WrapPanel}">
<EgtStone3D:GridViewPanelV DataContext="{StaticResource GridPanelVM}"/>
<Separator Style="{StaticResource TopPanel_Separator}"/>
<EgtStone3D:GridDimensionPanelV DataContext="{StaticResource GridPanelVM}"/>
</WrapPanel>
+3
View File
@@ -0,0 +1,3 @@
Public Class GridPanelV
End Class
+69
View File
@@ -39,6 +39,50 @@ Public Class GridPanelVM
NotifyPropertyChanged(NameOf(MeasureUnit))
End Sub
Private m_FileGridOnOffSVG As String = String.Empty
Public Property FileGridOnOffSVG As String
Get
Return m_FileGridOnOffSVG
End Get
Set(value As String)
m_FileGridOnOffSVG = value
NotifyPropertyChanged(NameOf(FileGridOnOffSVG))
End Set
End Property
Friend Sub SetFileGridOnOffSVG(sFileGridOnOffSVG As String)
m_FileGridOnOffSVG = sFileGridOnOffSVG
NotifyPropertyChanged(NameOf(FileGridOnOffSVG))
End Sub
Private m_FileGridDimSVG As String = String.Empty
Public Property FileGridDimSVG As String
Get
Return m_FileGridDimSVG
End Get
Set(value As String)
m_FileGridDimSVG = value
NotifyPropertyChanged(NameOf(FileGridDimSVG))
End Set
End Property
Friend Sub SetFileGridDimSVG(sFileGridDimSVG As String)
m_FileGridDimSVG = sFileGridDimSVG
NotifyPropertyChanged(NameOf(FileGridDimSVG))
End Sub
Private m_IsOpenGridDimension As Boolean = False
Public Property IsOpenGridDimension As Boolean
Get
Return m_IsOpenGridDimension
End Get
Set(value As Boolean)
m_IsOpenGridDimension = value
End Set
End Property
Friend Sub SetIsOpenGridDimension(bIsOpenGridDimension As Boolean)
m_IsOpenGridDimension = bIsOpenGridDimension
NotifyPropertyChanged(NameOf(IsOpenGridDimension))
End Sub
#Region "Messages"
Public ReadOnly Property MeasureUnit_Msg
@@ -64,6 +108,7 @@ Public Class GridPanelVM
Private m_cmdGridDimension As ICommand
Private m_cmdStatusUnits As ICommand
Private m_cmdZoomAll As ICommand
Private m_cmdShowPopUpCmd As ICommand
#End Region ' Fields & Properties
@@ -71,6 +116,8 @@ Public Class GridPanelVM
Sub New()
Map.SetRefGridPanelVM(Me)
SetFileGridOnOffSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridON.svg")
SetFileGridDimSVG(Map.refMainWindowVM.MainWindowM.sResourcesDir & "\GridDIM.svg")
End Sub
#End Region ' Constructor
@@ -190,6 +237,28 @@ Public Class GridPanelVM
#End Region ' ZoomAllCommand
#Region "ShowPopUpCommand"
Public ReadOnly Property ShowPopUpCommand As ICommand
Get
If m_cmdShowPopUpCmd Is Nothing Then
m_cmdShowPopUpCmd = New Command(AddressOf ShowPopUp)
End If
Return m_cmdShowPopUpCmd
End Get
End Property
Public Sub ShowPopUp(ByVal param As Object)
If m_IsOpenGridDimension Then
SetIsOpenGridDimension(False)
'SetView_Msg("▼" & EgtMsg(110019)) ' Vista
Else
SetIsOpenGridDimension(True)
'SetView_Msg("▲" & EgtMsg(110019)) ' Vista
End If
End Sub
#End Region ' ShowPopUpCommand
#End Region ' Commands
+24
View File
@@ -0,0 +1,24 @@
<Grid x:Class="GridViewPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
Margin="0,0,10,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button ToolTip="{Binding ZoomAllToolTip}"
Command="{Binding ZoomAllCommand}"
Style="{StaticResource Proj_Btn}">
<Image Source="/Resources/GridViewPanel/ZoomAll.png"
Style="{StaticResource Proj_Img}"/>
</Button>
<Button Grid.Row="1"
ToolTip="{Binding StatusGridText}"
Command="{Binding StatusGridCommand}"
Style="{StaticResource Grid_Btn}">
<EgtStone3D:SVGV FileSource="{Binding FileGridOnOffSVG, UpdateSourceTrigger=PropertyChanged}"/>
</Button>
</Grid>
+3
View File
@@ -0,0 +1,3 @@
Public Class GridViewPanelV
End Class
+1
View File
@@ -2,6 +2,7 @@
Public Class EditPanelVM
Inherits SceneUserControlVM
#Region "FIELDS & PROPERTIES"
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2})
+44 -19
View File
@@ -79,6 +79,16 @@ Public Class SceneButtonVM
End Set
End Property
Private m_ParametricListGroupBtn As New List(Of GroupSceneBtn)
Public Property ParametricListGroupBtn As List(Of GroupSceneBtn)
Get
Return m_ParametricListGroupBtn
End Get
Set(value As List(Of GroupSceneBtn))
m_ParametricListGroupBtn = value
End Set
End Property
Friend Enum TopPanel As Integer
TOP_PANEL = 0
TOP_PANEL_1 = 1
@@ -105,7 +115,8 @@ Public Class SceneButtonVM
Sub New()
Map.SetRefSceneButtonVM(Me)
LoadButtons()
LoadGroupButtons()
LoadGroupButtons(TOPPANELLIST_BTN, m_TopPanelListGroupBtn)
LoadGroupButtons("ParametricListBtn", m_ParametricListGroupBtn)
End Sub
#End Region ' Constructor
@@ -123,14 +134,14 @@ Public Class SceneButtonVM
SetButtonsLocation(BOTTOMCENTERLIST_BTN, m_BottomCenterListBtn)
End Sub
Private Sub LoadGroupButtons()
Private Sub LoadGroupButtons(NameList As String, GroupSceneBtnList As List(Of GroupSceneBtn))
Dim Index As Integer = 1
Dim SubTitle As String = String.Empty
Dim sKeyTitle As String = TOPPANELLIST_BTN & "_" & Index.ToString()
Dim sKeyTitle As String = NameList & "_" & Index.ToString()
While GetMainPrivateProfileString(sKeyTitle, ConstEgtStone3D.SUBTITLE, "", SubTitle) > 0
SetGroupButtonsLocation(sKeyTitle, m_TopPanelListGroupBtn)
SetGroupButtonsLocation(sKeyTitle, GroupSceneBtnList)
Index += 1
sKeyTitle = TOPPANELLIST_BTN & "_" & Index.ToString()
sKeyTitle = NameList & "_" & Index.ToString()
End While
End Sub
@@ -446,8 +457,22 @@ Module SceneCmd
#Region "METHODS"
Public Sub Exec(Flag)
Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
Public Function ExecFile(Flag As String, nVeinCtx As Integer) As Boolean
Dim bNewParametricExsists As Boolean = False
If Flag.Contains(".lua") Then
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
Dim LocalParametricCompo As New ParametricCompoVM(Flag, nVeinCtx)
If LocalParametricCompo.bFileExsist Then
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = LocalParametricCompo
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
bNewParametricExsists = True
End If
End If
Return bNewParametricExsists
End Function
Public Function ExecMethod(Flag As String, nVeinCtx As Integer) As Boolean
Dim bNewMethodsExsists As Boolean = True
Select Case Flag
Case EGT_AUTOPAIR
EgtSetCurrentContext(nVeinCtx)
@@ -490,23 +515,23 @@ Module SceneCmd
Case EGT_DELETE
SolidManagerM.Delete(Map.refSceneHostVM.m_nIdPart)
Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL
Case EGT_RECTANGE
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_RECTANGE & ".lua")
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
Case EGT_POLIGON
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_POLIGON & ".lua")
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
Case EGT_ELLIPSE
If IsNothing(Map.refSceneButtonVM.m_ParametricCompoUC) Then Map.refSceneButtonVM.m_ParametricCompoUC = New SceneUserControlV
Map.refSceneButtonVM.m_ParametricCompoUC.DataContext = New ParametricCompoVM(EGT_ELLIPSE & ".lua")
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_ParametricCompoUC)
Case EGT_EDIT_PANEL
If IsNothing(Map.refSceneButtonVM.m_EditPanelUC) Then Map.refSceneButtonVM.m_EditPanelUC = New SceneUserControlV
Map.refSceneButtonVM.m_EditPanelUC.DataContext = New EditPanelVM()
Map.refSceneButtonVM.LoadUC(Map.refSceneButtonVM.m_EditPanelUC)
Case Else
EgtOutLog("La chiamata del metodo '" & Flag & "' non è andata a buon fine")
bNewMethodsExsists = False
End Select
Return bNewMethodsExsists
End Function
Public Sub Exec(Flag As String)
Dim nVeinCtx As Integer = Map.refSceneHostVM.MainScene.GetCtx()
If Not ExecFile(Flag, nVeinCtx) Then
ExecMethod(Flag, nVeinCtx)
End If
End Sub
Friend Sub Undo()
+1 -2
View File
@@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtStone3D="clr-namespace:EgtStone3D">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -19,7 +18,7 @@
<Button ToolTip="{Binding Name}"
IsEnabled="{Binding IsEnabled}"
Command="{Binding CmdBtn}"
Height="65" Width="65" BorderThickness="0">
Height="65" Width="100" BorderThickness="0" Background="Transparent" Margin="3,0,0,0">
<!--<Image Source="{Binding Img}"/>-->
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
<EgtStone3D:SVGV FileSource="{Binding Img}" Height="50"/>
+1 -1
View File
@@ -15,7 +15,7 @@
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
m_SceneButtonVM = Map.refSceneButtonVM
Me.DataContext = m_SceneButtonVM.TopPanelListGroupBtn(SceneButtonVM.m_nIndexList_1)
Me.DataContext = m_SceneButtonVM.ParametricListGroupBtn(SceneButtonVM.m_nIndexList_1)
SceneButtonVM.m_nIndexList_1 += 1
End Sub
+1 -1
View File
@@ -64,7 +64,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ItemsControl ItemsSource="{Binding TopPanelListGroupBtn}">
<ItemsControl ItemsSource="{Binding ParametricListGroupBtn}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource TopPanel_WrapPanel}"
+7 -13
View File
@@ -134,6 +134,12 @@ Public Class TopPanelVM
End Get
End Property
Public ReadOnly Property ParametricListGroupBtn As List(Of GroupSceneBtn)
Get
Return Map.refSceneButtonVM.ParametricListGroupBtn
End Get
End Property
#Region "Messages"
Public ReadOnly Property NewFile_Msg
@@ -333,9 +339,6 @@ Public Class TopPanelVM
#Region "ShowPopUpCommand"
''' <summary>
''' Returns a command that do Export.
''' </summary>
Public ReadOnly Property ShowPopUpCommand As ICommand
Get
If m_cmdShowPopUpCmd Is Nothing Then
@@ -345,9 +348,6 @@ Public Class TopPanelVM
End Get
End Property
''' <summary>
''' Execute the Export. This method is invoked by the ExportCommand.
''' </summary>
Public Sub ShowPopUp(ByVal param As Object)
If m_IsOpen Then
SetIsOpen(False)
@@ -364,9 +364,6 @@ Public Class TopPanelVM
#Region "ShowPopUpProspectiveCommand"
''' <summary>
''' Returns a command that do Export.
''' </summary>
Public ReadOnly Property ShowPopUpProspectiveCommand As ICommand
Get
If m_cmdShowPopUpProspectiveCmd Is Nothing Then
@@ -375,10 +372,7 @@ Public Class TopPanelVM
Return m_cmdShowPopUpProspectiveCmd
End Get
End Property
''' <summary>
''' Execute the Export. This method is invoked by the ExportCommand.
''' </summary>
Public Sub ShowPopUpProspective(ByVal param As Object)
If m_IsOpenProspective Then
SetIsOpenProspective(False)
+10 -5
View File
@@ -296,8 +296,11 @@
</Style>
<Style x:Key="Grid_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Width" Value="80"/>
<Setter Property="Margin" Value="0,0,0,15"/>
<Setter Property="Background" Value="{StaticResource EgalwareTransparent}"/>
<Setter Property="Width" Value="60"/>
<Setter Property="Height" Value="60"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Margin" Value="0,5,0,5"/>
</Style>
<Style x:Key="TopPanel_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource Proj_Btn}">
@@ -357,6 +360,8 @@
<Style x:Key="GridPanel_Btn" TargetType="{x:Type Button}" BasedOn="{StaticResource Proj_Btn}">
<Setter Property="Width" Value="35"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Margin" Value="0,-5,0,3.5"/>
</Style>
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
@@ -1181,8 +1186,8 @@
<Style x:Key="GridPanel_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Foreground" Value="{StaticResource TextBox.Static.Foreground}"/>
<Setter Property="Width" Value="45"/>
<Setter Property="Margin" Value="-5,0,0,0"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Width" Value="60"/>
</Style>
<!--#endregion TextBoxStyle-->
@@ -2323,7 +2328,7 @@
</Style>
<Style x:Key="GridPanel_WrapPanel" TargetType="{x:Type WrapPanel}">
<Setter Property="Orientation" Value="Vertical"/>
<Setter Property="Orientation" Value="Horizontal"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Width" Value="Auto"/>