オートフィルオプションの項目をカスタマイズしたい
対象製品
SPREAD for WPF 1.0J
詳細
XAMLでDragFillSmartTagをカスタマイズすることで、ドラッグフィル実行時に表示されるオートフィルオプションを変更することができます。
以下のサンプルコードでは、オートフィルオプションの表示を抑止します。
◎サンプルコード(xaml)
以下のサンプルコードでは、オートフィルオプションの特定の項目を非表示にします。
◎サンプルコード(xaml)
以下のサンプルコードでは、オートフィルオプションの表示を抑止します。
◎サンプルコード(xaml)
<Window xmlns:sg="http://schemas.grapecity.com/windows/spreadgrid/2012" x:Class="M150804064.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="sg:DragFillSmartTag">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</Window.Resources>
<Grid>
<sg:GcSpreadGrid Name="gcSpreadGrid1" />
</Grid>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="sg:DragFillSmartTag">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</Window.Resources>
<Grid>
<sg:GcSpreadGrid Name="gcSpreadGrid1" />
</Grid>
</Window>
以下のサンプルコードでは、オートフィルオプションの特定の項目を非表示にします。
◎サンプルコード(xaml)
<Window xmlns:sg="http://schemas.grapecity.com/windows/spreadgrid/2012" x:Class="M150804064.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="sg:DragFillContextMenuItem">
<Style.Triggers>
<Trigger Property="Text" Value="書式のみコピー(フィル)">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="Text" Value="書式なしコピー(フィル)">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<sg:GcSpreadGrid Name="gcSpreadGrid1" />
</Grid>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="sg:DragFillContextMenuItem">
<Style.Triggers>
<Trigger Property="Text" Value="書式のみコピー(フィル)">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="Text" Value="書式なしコピー(フィル)">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<sg:GcSpreadGrid Name="gcSpreadGrid1" />
</Grid>
</Window>