ところで、なぜかXAMLで書こうとするとエラーが出ます。
x:Classを要求されたのですが、
エラー 1 partial 識別子が型 'WPFCustomControl.FLPTreeView' にありません。この型の別の partial 宣言が存在します。
FLPTreeViewは
public class FLPTreeView : TreeView
上記のように宣言しております。
partialを下記のようにつけると
public partial class FLPTreeView : TreeView
エラー 1 'WPFCustomControl.FLPTreeView' の partial 宣言では、異なる基本クラスを指定してはいけません。
と怒られてしまいます。
さがしてみましたが、他にpartial宣言をしているところがみつかりません。
XAMLの書き方を教えていただければ幸いです。
<ResourceDictionary x:Class="WPFCustomControl.FLPTreeView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPFCustomControl">
<HierarchicalDataTemplate DataType="{x:Type local:FLPATHTree}"
ItemsSource="{Binding Children}">
<HierarchicalDataTemplate.ItemContainerStyle>
<Style TargetType="TreeViewItem">
<EventSetter Event="Expanded" Handler="a"/>
</Style>
</HierarchicalDataTemplate.ItemContainerStyle>
</HierarchicalDataTemplate>
</ResourceDictionary>
もう2時だー、今日もXAML三昧だったなー