ElementMenu 的 ActivationHost
我正在使用模板动态创建 ScatterView
项目:
<s:ScatterView.ItemTemplate >
<DataTemplate>
<DockPanel LastChildFill="True" >
<DockPanel.Background>
<ImageBrush ImageSource="{Binding Type, Converter={StaticResource imgSelector}}"
Stretch="Fill" />
</DockPanel.Background>
<TextBox Background="Transparent" DockPanel.Dock="Top" Text="{Binding Path=Message}"
IsReadOnly="True" TextWrapping="Wrap" />
<s:ElementMenu Name="emBallMenu" VerticalAlignment="Top"
ActivationMode="HostInteraction" ActivationHost="?????">
<s:ElementMenuItem Header="Send back" x:Name="emiSendBack"
Command="local:MainSurfaceWindow.MenuItemCommand"
CommandParameter="{Binding Path=BallId}"/>
</s:ElementMenu>
</DockPanel>
</DataTemplate>
</s:ScatterView.ItemTemplate>
我应该在 emBallMenu
的 ActivationHost
中设置什么,以便手指点击时激活菜单在父 ScatterView.ItemTemplate
上?
I am creating dynamically ScatterView
items using a template:
<s:ScatterView.ItemTemplate >
<DataTemplate>
<DockPanel LastChildFill="True" >
<DockPanel.Background>
<ImageBrush ImageSource="{Binding Type, Converter={StaticResource imgSelector}}"
Stretch="Fill" />
</DockPanel.Background>
<TextBox Background="Transparent" DockPanel.Dock="Top" Text="{Binding Path=Message}"
IsReadOnly="True" TextWrapping="Wrap" />
<s:ElementMenu Name="emBallMenu" VerticalAlignment="Top"
ActivationMode="HostInteraction" ActivationHost="?????">
<s:ElementMenuItem Header="Send back" x:Name="emiSendBack"
Command="local:MainSurfaceWindow.MenuItemCommand"
CommandParameter="{Binding Path=BallId}"/>
</s:ElementMenu>
</DockPanel>
</DataTemplate>
</s:ScatterView.ItemTemplate>
What should I set in the ActivationHost
of the emBallMenu
so that menu gets activated on a finger tap on the parent ScatterView.ItemTemplate
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正确的答案是:
我在 此处
The correct response is :
I found this in here