小编Mah*_*mar的帖子

如何更改网格中所有文本框的字体大小,windows app uwp

我知道如何使用 HTML 和 CSS 开发网页,但我是 Windows 应用程序开发的新手,我正在尝试开发通用 Windows 平台 (UWP) 应用程序。

假设我有网格,

 <Grid Name="Grid1">
    <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="Normal">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="600" />
                </VisualState.StateTriggers> 
                <VisualState.Setters>
                    <Setter Target="text1.FontSize" Value="12" />
                    <Setter Target="text2.FontSize" Value="12" />
                    <Setter Target="text3.FontSize" Value="10" />                        
                </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
     <Grid.RowDefinitions>
        <RowDefinition></RowDefinition>
     </Grid.RowDefinitions>
    <TextBlock Name="text1" FontSize="22" Text="hello text">    </TextBlock>
    <TextBlock Name="text2" FontSize="22" Text="hello text1">    </TextBlock>
    <TextBlock Name="text3" FontSize="22" Text="hello text2">    </TextBlock>
</Grid>
Run Code Online (Sandbox Code Playgroud)

是否可以使用单个 VisualState.Setters 更改所有文本框的字体大小,就像我们在 HTML 中使用 CSS 类所做的那样?,因为我必须根据窗口宽度更改许多文本框字体大小。

对不起,如果问题太愚蠢和荒谬。提前致谢。

.net c# windows uwp uwp-xaml

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

如何有效地从矩阵中的每个重复行获取最小值和最大值

我需要生成下面解释的矩阵.如何有效地从矩阵中的每个重复行获取最小值和最大值?

假设我有以下数据作为矩阵:

A = 

    x        y      z 

   -250    -60    -60
   -250    -60    -59
   -250    -60    -58
   -250    -60     58
   -250    -60     59
   -250    -60     60
   -250    -59    -60
   -250    -59    -59
   -250    -59    -58
     .      .      .
     .      .      .
     .      .      .
   -250     59     58
   -250     59     59
   -250     59     60
   -250     60     58
   -250     60     59
   -250     60     60
Run Code Online (Sandbox Code Playgroud)

通过重复行,我的意思是x和y的相同值的多行.现在我希望每个重复值的最小值和最大值为z,以便我可以生成以下矩阵

      x        y        z 


   -250    -60     abs(min(z) - max(z)) % for all x = -250 and y = -60 …
Run Code Online (Sandbox Code Playgroud)

matlab matrix

2
推荐指数
1
解决办法
92
查看次数

标签 统计

.net ×1

c# ×1

matlab ×1

matrix ×1

uwp ×1

uwp-xaml ×1

windows ×1