mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-21 21:50:12 +08:00
119 lines
4.9 KiB
XML
119 lines
4.9 KiB
XML
<Window x:Class="BetterGenshinImpact.View.MaskWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:viewModel="clr-namespace:BetterGenshinImpact.ViewModel"
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
Title="MaskWindow"
|
|
AllowsTransparency="True"
|
|
WindowStyle="None"
|
|
Topmost="True"
|
|
Width="500"
|
|
Height="800"
|
|
ShowInTaskbar="False">
|
|
<Window.DataContext>
|
|
<viewModel:MaskWindowViewModel />
|
|
</Window.DataContext>
|
|
<b:Interaction.Triggers>
|
|
<b:EventTrigger EventName="Loaded">
|
|
<b:InvokeCommandAction
|
|
CommandParameter="{Binding}"
|
|
Command="{Binding LoadedCommand}" />
|
|
</b:EventTrigger>
|
|
</b:Interaction.Triggers>
|
|
|
|
<Window.Background>
|
|
<SolidColorBrush Color="#FFB0B0B0"
|
|
Opacity="0" />
|
|
</Window.Background>
|
|
<Window.Style>
|
|
<Style TargetType="Window">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Window">
|
|
<ContentPresenter />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Style>
|
|
|
|
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="/View/Controls/Style/DraggableResizableItem.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
|
|
|
|
<AdornerDecorator ClipToBounds="True">
|
|
<Canvas x:Name="WholeCanvas" SnapsToDevicePixels="True">
|
|
|
|
<!--<CheckBox x:Name="TestChk" Click="OnClick"
|
|
Content=" select"
|
|
Foreground="LightGray"
|
|
FontFamily="UISegoe"
|
|
FontSize="15"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top" Canvas.Left="27" Canvas.Top="409" />-->
|
|
|
|
<ContentControl x:Name="LogTextBoxWrapper" Height="188" Canvas.Left="20" Canvas.Top="500" Width="477"
|
|
Style="{StaticResource OuterDraggableResizableItemStyle}">
|
|
<RichTextBox
|
|
x:Name="LogTextBox"
|
|
Background="Transparent"
|
|
Foreground="LightGray"
|
|
FontSize="12"
|
|
FontFamily="Cascadia Mono, Consolas, Courier New, monospace"
|
|
BorderThickness="0"
|
|
VerticalScrollBarVisibility="Hidden"
|
|
Visibility="{Binding LogTextBoxVisibility}"
|
|
IsHitTestVisible="False" />
|
|
</ContentControl>
|
|
|
|
<!--<ContentControl Width="230"
|
|
Height="130"
|
|
Canvas.Top="150"
|
|
Canvas.Left="470"
|
|
Style="{StaticResource DraggableResizableItemStyle}">
|
|
<Grid>
|
|
<Rectangle Fill="White" IsHitTestVisible="False" Opacity="0.2" />
|
|
<TextBlock Text="识别窗口" Foreground="White" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
|
</Grid>
|
|
</ContentControl>-->
|
|
|
|
<ItemsControl ItemsSource="{Binding MaskButtons, Mode=TwoWay}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<Canvas IsItemsHost="True" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemContainerStyle>
|
|
<Style>
|
|
<Setter Property="Canvas.Left" Value="{Binding X}" />
|
|
<Setter Property="Canvas.Top" Value="{Binding Y}" />
|
|
</Style>
|
|
</ItemsControl.ItemContainerStyle>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button Command="{Binding ClickAction}" Content="{Binding Name}" Name="btn" Opacity="0.5"
|
|
Height="{Binding Height}" Width="{Binding Width}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<!--uid遮盖-->
|
|
<Rectangle
|
|
Fill="White"
|
|
IsHitTestVisible="False"
|
|
Width="{Binding UidCoverRect.Width, Mode=OneWay}"
|
|
Height="{Binding UidCoverRect.Height, Mode=OneWay}"
|
|
Canvas.Left="{Binding UidCoverRect.X, Mode=OneWay}"
|
|
Canvas.Top="{Binding UidCoverRect.Y, Mode=OneWay}"
|
|
Visibility="{Binding UidCoverVisibility}"/>
|
|
</Canvas>
|
|
</AdornerDecorator>
|
|
|
|
</Window> |