
Sorry for my bad Xaml code. Here is my userControl's code:
<Grid x:Uid="Grid_1" Margin="10" ToolTip="{Binding ToolTip}">
<StackPanel x:Uid="StackPanel_1" Grid.Row="1" Orientation="Horizontal"
ZIndex="{Binding ZIndex, Mode=TwoWay}">
<Slider x:Uid="ScaleSlider" x:Name="ScaleSlider" Minimum="0.2" Maximum="10" LargeChange="0.5" SmallChange="0.1"
Value="{Binding ScaleSlider}" IsSnapToTickEnabled="True" TickFrequency="0.1" Visibility="Hidden" />
</StackPanel>
<ScrollViewer x:Uid="ScrollViewer_1" Grid.Row="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Border x:Uid="AlStatusBorder" BorderBrush="#101010" BorderThickness="3"
Background="{Binding Color}"
x:Name="AlStatusBorder"
Padding="5"
CornerRadius="10" HorizontalAlignment="Center" VerticalAlignment="Top"
>
<Grid x:Uid="Grid_2">
<!-- Tachometer Gauge -->
<gauge:CircularGauge x:Uid="gauge:CircularGauge_1" Grid.Row="1" Grid.Column="2" FrameType="CircularTopGradient" Width="150" Height="150" Radius="75" Background="#444444"
RimBrush="#444444"
ZIndex="{Binding ZIndex, Mode=TwoWay}">
<gauge:CircularGauge.LayoutTransform >
<ScaleTransform x:Uid="ScaleTransform_1" ScaleX="{Binding ElementName=ScaleSlider, Path=Value}"
ScaleY="{Binding ElementName=ScaleSlider, Path=Value}"/>
</gauge:CircularGauge.LayoutTransform>
<gauge:CircularGauge.Items>
<TextBlock x:Uid="AlMessgroesse1" gauge:CircularGauge.X="0" gauge:CircularGauge.Y="-18" Text="{Binding MeasuredValue}" x:Name="AlMessgroesse1"
Foreground="WhiteSmoke" FontSize="8" />
<TextBlock x:Uid="AlMessEinheit1" gauge:CircularGauge.X="0" gauge:CircularGauge.Y="20" Text="{Binding UnitOfMeasure}" Foreground="WhiteSmoke" x:Name="AlMessEinheit1"
FontSize="8" />
<TextBlock x:Uid="AlXScalFactor" gauge:CircularGauge.X="0" gauge:CircularGauge.Y="33" Text="{Binding ScaleFactor}"
Foreground="WhiteSmoke" x:Name="AlXScalFactor"
FontSize="8" RenderTransformOrigin="-1,0.5" />
</gauge:CircularGauge.Items>
<gauge:CircularGauge.Scales>
<!-- Tachometer -->
<gauge:CircularScale x:Uid="AlCircularScale1" Radius="64" StartAngle="110" SweepAngle="320" BarExtent="5" IsBarVisible="False" x:Name="AlCircularScale1"
Background="{shared:LinearGradientBrush Gray, DarkGray, GradientType=TopToBottom}"
ZIndex="{Binding ZIndex, Mode=TwoWay}">
<gauge:CircularScale.TickSets>
<gauge:CircularTickSet Minimum="{Binding MinimumScaleValue}" Maximum="{Binding MaximumScaleValue}"
MajorInterval="{Binding MajorInterval}" MajorIntervalType="Auto"
MinorInterval="{Binding MinorInterval}" MinorIntervalType="Auto"
IsLogarithmic="{Binding IsLogarithmic}"
LogarithmicBase="{Binding LogarithmicBase}" IntervalOrigin="Minimum"
x:Name="AlScaleTickSet1"
ZIndex="{Binding ZIndex, Mode=TwoWay}" >
<gauge:CircularTickSet.Ranges>
//Here are code for ranges
</gauge:CircularTickSet.Ranges>
<gauge:CircularTickSet.Ticks>
//Here are code for ticks
</gauge:CircularTickSet.Ticks>
<gauge:CircularTickSet.Pointers>
//Code for pointer
</gauge:CircularTickSet.Pointers>
</gauge:CircularTickSet>
</gauge:CircularScale.TickSets>
</gauge:CircularScale>
</gauge:CircularGauge.Scales>
</gauge:CircularGauge>
</Grid>
</Border>
</ScrollViewer>
</Grid>
As I understood, userControl should have somewhere property with ZIndex value. As you can see, I tried to use ZIndex from different places, but ZIndex in my viewModel is always zero. And I can't find any example of using ZIndex in Actipro. Should I get ZIndex from my userControl, or from some other place?
Thank you