
全画面スキンテスト
ブログの画像作成用に適当に作ったスキン
全画面スキンはちょっとした設定ミスでPC操作が効かなくなるため十分注意すること
スキン作成者向けオプション-デスクトップにzeKeyツールを表示する
にチェックを入れておくことを推奨
入れ忘れて操作不能になった場合 すべてキーボード操作で[Ctrl]+[Alt]+[Del]でタスクマネージャを起動しzeKeyを終了する
- <!-- zeKey skinfile https://ze-key.blogspot.jp/ -->
- <!-- 改造する場合は慎重にお願いします 全面にかぶさるためPC操作が出来なくなってしまうことがあります -->
- <z:Keyboard xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:z="clr-namespace:zeKey.Skin;assembly=zeKey"
- Width="{Binding Display.Width,
- FallbackValue=300}"
- Height="{Binding Display.Height,
- FallbackValue=200}"
- Left="0"
- Top="0">
- <z:Keyboard.SkinInfo>
- <z:SkinInfo Title="落書き InkCanvasテスト"
- Author="T.Naga"
- License="改変自由"
- Version="0.1.0">
- <z:SkinInfo.Information>
- <StackPanel>
- <TextBlock TextWrapping="Wrap">
- ディスプレイ全面が透明なキャンバスになり落書きができます<Run Text=" " />
- <LineBreak />
- 使い方: 右上にメニューがあります<Run Text=" " />
- [落書き]トグルボタンを押しこむと落書きモード<Run Text=" " />
- ドロップダウンリストでペン選択<Run Text=" " />
- [消去]ボタンで全消去<Run Text=" " />
- [終了]ボタンでスキンを閉じる<Run Text=" " />
- <LineBreak />
- 注意:<Run Text=" " />
- ・落書きモード中は他のウィンドウの操作はできません 操作したい時は落書きモードを解除します<Run Text=" " />
- ・落書きモード中でなくても色のついた部分は操作できません<Run Text=" " />
- ・後から開いたスキンは上にかぶります<Run Text=" " />
- ・他に最前面ウィンドウがあると下になる場合があります<Run Text=" " />
- <LineBreak />
- InkCanvasにはもっといろいろな機能があるんですが コマンドを用意するのが面倒なので全消去機能のみ<Run Text=" " />
- ペンはResourcesに追加すればいくらでも増やせます<Run Text=" " />
- <LineBreak />
- 詳しい説明は
- <z:Hyperlink NavigateUri="https://ze-key.blogspot.jp/">ブログ</z:Hyperlink>
- を参照してください
- </TextBlock>
- </StackPanel>
- </z:SkinInfo.Information>
- </z:SkinInfo>
- </z:Keyboard.SkinInfo>
- <z:Keyboard.Resources>
- <x:Array x:Key="Pens" Type="DrawingAttributes">
- <!-- ペン -->
- <DrawingAttributes Width="3"
- Height="3"
- FitToCurve="true"
- Color="Black" />
- <DrawingAttributes Width="5"
- Height="5"
- FitToCurve="true"
- IsHighlighter="True"
- Color="Blue" />
- <DrawingAttributes Width="5"
- Height="5"
- FitToCurve="true"
- IsHighlighter="True"
- Color="Green" />
- <DrawingAttributes Width="5"
- Height="5"
- FitToCurve="true"
- IsHighlighter="True"
- Color="Red" />
- <DrawingAttributes Width="10"
- Height="10"
- StylusTip="Rectangle"
- Color="White" />
- </x:Array>
- <DataTemplate DataType="{x:Type DrawingAttributes}">
- <Border Height="20">
- <Border Width="50" Height="{Binding Path=Height}">
- <Border.Background>
- <SolidColorBrush Color="{Binding Path=Color}" />
- </Border.Background>
- </Border>
- </Border>
- </DataTemplate>
- </z:Keyboard.Resources>
- <Grid>
- <InkCanvas x:Name="Ink"
- Cursor="Pen"
- DefaultDrawingAttributes="{Binding ElementName=Combo,
- Path=SelectedItem}"
- UseCustomCursor="True">
- <InkCanvas.Style>
- <Style TargetType="{x:Type InkCanvas}">
- <Setter Property="Background" Value="{x:Null}" />
- <Setter Property="IsHitTestVisible" Value="False" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=Toggle, Path=IsChecked}" Value="true">
- <Setter Property="Background" Value="#01FFFFFF" />
- <Setter Property="IsHitTestVisible" Value="True" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </InkCanvas.Style>
- </InkCanvas>
- <StackPanel HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <StackPanel.Background>
- <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}" />
- </StackPanel.Background>
- <ToggleButton x:Name="Toggle"
- Margin="5"
- Content="落書き"
- Focusable="False" />
- <ComboBox Name="Combo"
- Width="50"
- Margin="5"
- ItemsSource="{StaticResource Pens}"
- SelectedIndex="0" />
- <Button Margin="5"
- Command="{Binding InkCanvasStrokesClearCommand}"
- CommandParameter="{Binding ElementName=Ink}"
- Content="消去" />
- <Button Margin="5"
- Command="{Binding CloseCommand}"
- Content="終了" />
- </StackPanel>
- </Grid>
- </z:Keyboard>
0 件のコメント :
コメントを投稿