usercontrol.vb ファイル
Imports System.Data
Imports Orion_Magnetics_Ascend.StrategicAlliance
Public Class usrValueSet
Public WriteOnly Property LabelPropertyValueSet() As String
Set(ByVal value As String)
lblValueSetsName.Text = value
End Set
End Property
End Class
usercontrol.xaml ファイル
<UserControl x:Class="usrValueSet"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40">
</RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Name="lblValueSetsName" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
</Grid>
</UserControl>
サンプルページで以下のように使用されるユーザーコントロール
<local:usrValueSet x:Name="TFR_uvsCurrentLimitingFusePanelRating" Master="CurrentLimitingFusePanelRating" LabelPropertyValueSet="{DynamicResource TFR_tbRating}" MaxTextLength="25"></local:usrValueSet>
上記の「LabelPropertyValueSet」が表示されている場合は、動的リソースが割り当てられています
しかし、それは私にエラーを与えます
タイプ「usrValueSet」の「LabelPropertyValueSet」プロパティーに「DynamicResourceExtension」を設定することはできません。「DynamicResourceExtension」は、DependencyObject の DependencyProperty でのみ設定できます。
上記のように..
動的リソースを usercontrol プロパティに割り当てる方法を知っている人はいますか...?