小编Rob*_*don的帖子

在代码隐藏中的DataTemplate中找到一个WPF元素

我有一个数据模板

<Window.Resources>
         <DataTemplate x:Key="BarChartItemsTemplate">
         <Border Width="385" Height="50">
            <Grid>
               <Rectangle Name="rectangleBarChart" Fill="MediumOrchid" StrokeThickness="2" Height="40" Width="{Binding}" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                  <Rectangle.LayoutTransform>
                     <ScaleTransform ScaleX="4"/>
                  </Rectangle.LayoutTransform>
               </Rectangle>
               <TextBlock Margin="14" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding}">
                  <TextBlock.LayoutTransform>
                     <TransformGroup>
                        <RotateTransform Angle="90"/>
                        <ScaleTransform ScaleX="-1" ScaleY="1"/>
                     </TransformGroup>
                  </TextBlock.LayoutTransform>
               </TextBlock>
            </Grid>
         </Border>
      </DataTemplate>
  </Window.Resources>
Run Code Online (Sandbox Code Playgroud)

我在表格上有一个按钮.我需要从dataTemplate更改矩形(scaleTransform).我如何访问上述按钮的Button_Click事件中的'rectangleBarChart'元素?

c# wpf xaml datatemplate bar-chart

20
推荐指数
1
解决办法
3万
查看次数

文本框默认值 - OutSystems

我用OutSystems开发了一个应用程序,我有一个实体属性,其数据类型是整数.现在,当我打开该特定表单进行编辑时,实体属性为整数类型,该文本框中的默认值显示为0(零).我必须手动删除默认值,然后输入其他一些值.

当我打开表格进行编辑时,有没有机会看到"清除"(空白)文本框.

谢谢 !!

outsystems

3
推荐指数
1
解决办法
2018
查看次数

标签 统计

bar-chart ×1

c# ×1

datatemplate ×1

outsystems ×1

wpf ×1

xaml ×1