|
10 | 10 | xmlns:spp="https://steampp.net/ui" |
11 | 11 | xmlns:ui="using:FluentAvalonia.UI.Controls" |
12 | 12 | Title="游戏无边框窗口化" |
13 | | - d:DesignHeight="450" |
| 13 | + d:DesignHeight="850" |
14 | 14 | d:DesignWidth="800" |
15 | 15 | x:CompileBindings="True" |
16 | 16 | x:DataType="spp:BorderlessGamePageViewModel" |
|
103 | 103 | </StackPanel> |
104 | 104 | </spp:PageBase.PaneContent> |
105 | 105 |
|
106 | | - <ScrollViewer Padding="10"> |
107 | | - <StackPanel Spacing="20"> |
108 | | - <WrapPanel HorizontalAlignment="Center"> |
109 | | - <Image |
110 | | - x:Name="move" |
111 | | - Width="64" |
112 | | - HorizontalAlignment="Left" |
113 | | - Source="avares://BD.WTTS.Client.Plugins.GameTools/UI/Assets/movecross.png"> |
114 | | - <i:Interaction.Behaviors> |
115 | | - <ia:EventTriggerBehavior EventName="PointerPressed" SourceObject="{Binding #move}"> |
116 | | - <ia:InvokeCommandAction Command="{ReflectionBinding $parent[spp:PageBase].((spp:BorderlessGamePageViewModel)DataContext).Cross_MouseDown}" /> |
117 | | - </ia:EventTriggerBehavior> |
118 | | - </i:Interaction.Behaviors> |
119 | | - </Image> |
120 | | - <TextBlock |
121 | | - Margin="10,0" |
122 | | - VerticalAlignment="Center" |
123 | | - Text="{Binding Path=Res.GameRelated_Borderless_MoveMouseTip, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
124 | | - </WrapPanel> |
| 106 | + <ScrollViewer> |
| 107 | + <StackPanel x:Name="Grid_Menu" MaxWidth="1000"> |
| 108 | + <Border Padding="20" Classes="paper" |
| 109 | + Height="180" Margin="16"> |
| 110 | + <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> |
| 111 | + <Grid.ColumnDefinitions> |
| 112 | + <ColumnDefinition Width="*" /> |
| 113 | + <ColumnDefinition Width="*" /> |
| 114 | + </Grid.ColumnDefinitions> |
| 115 | + <Grid HorizontalAlignment="Center" Grid.Column="0"> |
| 116 | + <Image |
| 117 | + Width="64" |
| 118 | + HorizontalAlignment="Left" |
| 119 | + Source="avares://BD.WTTS.Client.Plugins.GameTools/UI/Assets/movecross_hide.png"> |
| 120 | + </Image> |
| 121 | + <Image |
| 122 | + x:Name="move" |
| 123 | + Width="64" |
| 124 | + HorizontalAlignment="Left" |
| 125 | + Source="avares://BD.WTTS.Client.Plugins.GameTools/UI/Assets/movecross.png"> |
| 126 | + <i:Interaction.Behaviors> |
| 127 | + <ia:EventTriggerBehavior EventName="PointerPressed" SourceObject="{Binding #move}"> |
| 128 | + <ia:InvokeCommandAction Command="{ReflectionBinding $parent[spp:PageBase].((spp:BorderlessGamePageViewModel)DataContext).Cross_MouseDown}" /> |
| 129 | + </ia:EventTriggerBehavior> |
| 130 | + </i:Interaction.Behaviors> |
| 131 | + </Image> |
| 132 | + </Grid> |
| 133 | + <TextBlock Grid.Column="1" |
| 134 | + Margin="10" |
| 135 | + VerticalAlignment="Center" |
| 136 | + Text="{Binding Path=Res.GameRelated_Borderless_MoveMouseTip, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" |
| 137 | + TextWrapping="WrapWithOverflow"/> |
| 138 | + </Grid> |
| 139 | + </Border> |
125 | 140 |
|
126 | | - <Grid |
127 | | - HorizontalAlignment="Center" |
128 | | - ColumnDefinitions="Auto,*" |
129 | | - IsVisible="{ReflectionBinding !!SelectWindow}" |
130 | | - RowDefinitions="Auto,Auto,Auto,Auto"> |
131 | | - <TextBlock VerticalAlignment="Center" Text="{Binding Path=Res.GameRelated_Borderless_Title, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
132 | | - <TextBox |
133 | | - Grid.Column="1" |
134 | | - Margin="0,0,0,10" |
135 | | - IsReadOnly="True" |
136 | | - Text="{ReflectionBinding SelectWindow.Title, |
137 | | - Mode=OneWay}" |
138 | | - TextWrapping="WrapWithOverflow" /> |
| 141 | + <Expander Margin="16" IsExpanded="True"> |
| 142 | + <Expander.Styles> |
| 143 | + <Style Selector="Expander /template/ ToggleButton#ExpanderHeader"> |
| 144 | + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
| 145 | + </Style> |
| 146 | + </Expander.Styles> |
| 147 | + <Expander.Header> |
| 148 | + <DockPanel> |
| 149 | + <StackPanel Orientation="Horizontal" > |
| 150 | + <ui:FontIcon FontSize="26" Margin="0 0 12 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 151 | + <TextBlock VerticalAlignment="Center" Text="游戏信息" /> |
| 152 | + <!--<TextBlock VerticalAlignment="Center" Text="{Binding Path=Res.SteamAppType_Game, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />--> |
| 153 | + <!--<TextBlock VerticalAlignment="Center" Text="{Binding Path=Res.Info, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />--> |
| 154 | + </StackPanel> |
| 155 | + <Button DockPanel.Dock="Right" HorizontalAlignment="Right" |
| 156 | + Width="100" Content="{Binding Path=Res.Copy, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" |
| 157 | + Command="{ReflectionBinding CopyGameInfo_Click}" |
| 158 | + IsEnabled="{ReflectionBinding !!SelectWindow}" /> |
| 159 | + </DockPanel> |
| 160 | + </Expander.Header> |
| 161 | + |
| 162 | + <StackPanel> |
| 163 | + <Grid |
| 164 | + HorizontalAlignment="Stretch" |
| 165 | + ColumnDefinitions="Auto,*" |
| 166 | + RowDefinitions="Auto,Auto,Auto,Auto"> |
| 167 | + <TextBlock VerticalAlignment="Top" Text="{Binding Path=Res.GameRelated_Borderless_Title, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
| 168 | + <SelectableTextBlock |
| 169 | + Grid.Column="1" |
| 170 | + Margin="4,0,0,10" |
| 171 | + Text="{ReflectionBinding SelectWindow.Title, |
| 172 | + Mode=OneWay}" |
| 173 | + TextWrapping="WrapWithOverflow" |
| 174 | + Foreground="Gray" VerticalAlignment="Top" /> |
139 | 175 |
|
140 | | - <TextBlock |
141 | | - Grid.Row="1" |
142 | | - VerticalAlignment="Center" |
143 | | - Text="{Binding Path=Res.GameRelated_Borderless_Process, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
144 | | - <TextBox |
145 | | - Grid.Row="1" |
146 | | - Grid.Column="1" |
147 | | - Margin="0,0,0,10" |
148 | | - IsReadOnly="True" |
149 | | - Text="{ReflectionBinding SelectWindow.Title, |
150 | | - Mode=OneWay}" |
151 | | - TextWrapping="WrapWithOverflow" /> |
| 176 | + <TextBlock |
| 177 | + Grid.Row="1" |
| 178 | + VerticalAlignment="Top" |
| 179 | + Text="{Binding Path=Res.GameRelated_Borderless_Process, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
| 180 | + <SelectableTextBlock |
| 181 | + Grid.Row="1" |
| 182 | + Grid.Column="1" |
| 183 | + Margin="4,0,0,10" |
| 184 | + Text="{ReflectionBinding SelectWindow.Title, |
| 185 | + Mode=OneWay}" |
| 186 | + TextWrapping="WrapWithOverflow" |
| 187 | + Foreground="Gray" VerticalAlignment="Top" /> |
152 | 188 |
|
153 | | - <TextBlock |
154 | | - Grid.Row="2" |
155 | | - VerticalAlignment="Center" |
156 | | - Text="{Binding Path=Res.GameRelated_Borderless_ClassName, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
157 | | - <TextBox |
158 | | - Grid.Row="2" |
159 | | - Grid.Column="1" |
160 | | - Margin="0,0,0,10" |
161 | | - IsReadOnly="True" |
162 | | - Text="{ReflectionBinding SelectWindow.Name, |
163 | | - Mode=OneWay}" |
164 | | - TextWrapping="WrapWithOverflow" /> |
| 189 | + <TextBlock |
| 190 | + Grid.Row="2" |
| 191 | + VerticalAlignment="Top" |
| 192 | + Text="{Binding Path=Res.GameRelated_Borderless_ClassName, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
| 193 | + <SelectableTextBlock |
| 194 | + Grid.Row="2" |
| 195 | + Grid.Column="1" |
| 196 | + Margin="4,0,0,10" |
| 197 | + Text="{ReflectionBinding SelectWindow.Name, |
| 198 | + Mode=OneWay}" |
| 199 | + TextWrapping="WrapWithOverflow" |
| 200 | + Foreground="Gray" VerticalAlignment="Top" /> |
165 | 201 |
|
166 | | - <TextBlock |
167 | | - Grid.Row="3" |
168 | | - VerticalAlignment="Center" |
169 | | - Text="{Binding Path=Res.GameRelated_Borderless_Path, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
170 | | - <TextBox |
171 | | - Grid.Row="3" |
172 | | - Grid.Column="1" |
173 | | - Margin="0,0,0,10" |
174 | | - IsReadOnly="True" |
175 | | - Text="{ReflectionBinding SelectWindow.Path, |
176 | | - Mode=OneWay}" |
177 | | - TextWrapping="WrapWithOverflow" /> |
178 | | - </Grid> |
| 202 | + <TextBlock |
| 203 | + Grid.Row="3" |
| 204 | + VerticalAlignment="Top" |
| 205 | + Text="{Binding Path=Res.GameRelated_Borderless_Path, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat={}{0}:}" /> |
| 206 | + <SelectableTextBlock |
| 207 | + Grid.Row="3" |
| 208 | + Grid.Column="1" |
| 209 | + Margin="4,0,0,10" |
| 210 | + Text="{ReflectionBinding SelectWindow.Path, |
| 211 | + Mode=OneWay}" |
| 212 | + TextWrapping="WrapWithOverflow" |
| 213 | + Foreground="Gray" VerticalAlignment="Top" /> |
| 214 | + </Grid> |
179 | 215 |
|
180 | | - <WrapPanel HorizontalAlignment="Center" Orientation="Horizontal"> |
181 | | - <WrapPanel.Styles> |
182 | | - <Style Selector="Button"> |
183 | | - <Setter Property="Height" Value="30" /> |
184 | | - <Setter Property="Margin" Value="3" /> |
185 | | - </Style> |
186 | | - </WrapPanel.Styles> |
187 | | - <Button Command="{ReflectionBinding WindowKill_Click}" Content="{Binding Path=Res.GameRelated_Borderless_KillProcess, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
188 | | - <Button Command="{ReflectionBinding BorderlessWindow_Click}" Content="{Binding Path=Res.GameRelated_Borderless_BorderlessWindow, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
189 | | - <Button Command="{ReflectionBinding MaximizeWindow_Click}" Content="{Binding Path=Res.GameRelated_Borderless_Maximize, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
190 | | - <Button Command="{ReflectionBinding NormalWindow_Click}" Content="{Binding Path=Res.GameRelated_Borderless_Normal, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
191 | | - <Button Command="{ReflectionBinding HideWindow_Click}" Content="{Binding Path=Res.GameRelated_Borderless_Hide, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
192 | | - <Button Command="{ReflectionBinding ShowWindow_Click}" Content="{Binding Path=Res.GameRelated_Borderless_Show, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
193 | | - <Button |
194 | | - Command="{ReflectionBinding ToWallerpaperWindow_Click}" |
195 | | - Content="{Binding Path=Res.GameRelated_Borderless_ToWallerpaper, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" |
196 | | - ToolTip.Tip="{Binding Path=Res.GameRelated_Borderless_ToWallerpaperTip, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
197 | | - <Button Command="{ReflectionBinding ResetWallerpaper_Click}" Content="{Binding Path=Res.GameRelated_Borderless_ResetWallerpaper, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" /> |
198 | | - </WrapPanel> |
| 216 | + <Border x:Name="ButtonGroup" Padding="4" Classes="paper" Margin="-16 16 -16 -16" |
| 217 | + Height="200"> |
| 218 | + <WrapPanel HorizontalAlignment="Center" Orientation="Horizontal"> |
| 219 | + <WrapPanel.Styles> |
| 220 | + <Style Selector="Button"> |
| 221 | + <Setter Property="Height" Value="30" /> |
| 222 | + <Setter Property="Margin" Value="8" /> |
| 223 | + <Setter Property="Width" Value="120" /> |
| 224 | + </Style> |
| 225 | + </WrapPanel.Styles> |
199 | 226 |
|
200 | | - <!--<TextBlock Text="{ReflectionBinding Path=Res.GameRelated_Borderless_ToWallerpaperTip, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat=*{0}}" TextWrapping="WrapWithOverflow" />--> |
| 227 | + <!--Button Group 1--> |
| 228 | + <Button Classes="accent" Command="{ReflectionBinding BorderlessWindow_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}" > |
| 229 | + <!--<Button.Styles> |
| 230 | + <Style Selector="Button"> |
| 231 | + <Setter Property="Background" Value="#0071c7" /> |
| 232 | + <Setter Property="Foreground" Value="White" /> |
| 233 | + </Style> |
| 234 | + <Style Selector="Button:pointerover /template/ ContentPresenter#PART_ContentPresenter"> |
| 235 | + <Setter Property="TextElement.Foreground" Value="White" /> |
| 236 | + <Setter Property="TextElement.Background" Value="#006abb" /> |
| 237 | + </Style> |
| 238 | + <Style Selector="Button:pressed /template/ ContentPresenter#PART_ContentPresenter"> |
| 239 | + <Setter Property="Background" Value="#0062ae" /> |
| 240 | + </Style> |
| 241 | + </Button.Styles>--> |
201 | 242 |
|
202 | | - </StackPanel> |
| 243 | + <StackPanel Orientation="Horizontal"> |
| 244 | + <ui:FontIcon Glyph="" FontFamily="Segoe Fluent Icons" /> |
| 245 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_BorderlessWindow, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 246 | + </StackPanel> |
| 247 | + </Button> |
| 248 | + <Button Command="{ReflectionBinding MaximizeWindow_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}"> |
| 249 | + <StackPanel Orientation="Horizontal"> |
| 250 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 251 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_Maximize, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 252 | + </StackPanel> |
| 253 | + </Button> |
| 254 | + <Button Command="{ReflectionBinding NormalWindow_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}"> |
| 255 | + <StackPanel Orientation="Horizontal"> |
| 256 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 257 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_Normal, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 258 | + </StackPanel> |
| 259 | + </Button> |
| 260 | + |
| 261 | + <!--Button Group 2--> |
| 262 | + <Button Command="{ReflectionBinding HideWindow_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}"> |
| 263 | + <StackPanel Orientation="Horizontal"> |
| 264 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 265 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_Hide, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 266 | + </StackPanel> |
| 267 | + </Button> |
| 268 | + <Button Command="{ReflectionBinding ShowWindow_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}"> |
| 269 | + <StackPanel Orientation="Horizontal"> |
| 270 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 271 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_Show, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 272 | + </StackPanel> |
| 273 | + </Button> |
| 274 | + |
| 275 | + <!--Button Group 3--> |
| 276 | + <Button |
| 277 | + Command="{ReflectionBinding ToWallerpaperWindow_Click}" |
| 278 | + IsEnabled="{ReflectionBinding !!SelectWindow}" |
| 279 | + ToolTip.Tip="{Binding Path=Res.GameRelated_Borderless_ToWallerpaperTip, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"> |
| 280 | + <StackPanel Orientation="Horizontal"> |
| 281 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 282 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_ToWallerpaper, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 283 | + </StackPanel> |
| 284 | + </Button> |
| 285 | + <Button Command="{ReflectionBinding ResetWallerpaper_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}"> |
| 286 | + <StackPanel Orientation="Horizontal"> |
| 287 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 288 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_ResetWallerpaper, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 289 | + </StackPanel> |
| 290 | + </Button> |
| 291 | + |
| 292 | + <Button Command="{ReflectionBinding WindowKill_Click}" IsEnabled="{ReflectionBinding !!SelectWindow}"> |
| 293 | + <Button.Styles> |
| 294 | + <Style Selector="Button:pointerover /template/ ContentPresenter#PART_ContentPresenter"> |
| 295 | + <Setter Property="TextElement.Foreground" Value="White" /> |
| 296 | + <Setter Property="TextElement.Background" Value="Red" /> |
| 297 | + </Style> |
| 298 | + <Style Selector="Button:pressed /template/ ContentPresenter#PART_ContentPresenter"> |
| 299 | + <Setter Property="Background" Value="#f1707a" /> |
| 300 | + </Style> |
| 301 | + </Button.Styles> |
| 302 | + <StackPanel Orientation="Horizontal"> |
| 303 | + <ui:FontIcon Margin="0 0 4 0" FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" /> |
| 304 | + <TextBlock Text="{Binding Path=Res.GameRelated_Borderless_KillProcess, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"/> |
| 305 | + </StackPanel> |
| 306 | + </Button> |
| 307 | + |
| 308 | + </WrapPanel> |
| 309 | + </Border> |
| 310 | + </StackPanel> |
| 311 | + </Expander> |
| 312 | + </StackPanel> |
| 313 | + |
| 314 | + <!--<TextBlock Text="{ReflectionBinding Path=Res.GameRelated_Borderless_ToWallerpaperTip, Mode=OneWay, Source={x:Static s:ResourceService.Current}, StringFormat=*{0}}" TextWrapping="WrapWithOverflow" />--> |
203 | 315 | </ScrollViewer> |
204 | 316 | </spp:PageBase> |
0 commit comments