腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
UserControl
:
我
可以
在
XAML
中
设置
自己
的
DependencyProperty
吗
?
wpf
、
xaml
、
user-controls
我
希望能够做这样
的
事情: .
xaml
.cs: public partial class MyControl :
UserControl
public MyControl() => InitializeComponent(); public static readonly
DependencyProperty
MyTemplateProperty =
DependencyProperty
.Register(毫不奇怪,当元素名以
UserControl</e
浏览 14
提问于2019-05-09
得票数 2
回答已采纳
1
回答
使用户能够替换/重写
我
的
DependencyProperty
中
的
UserControl
c#
、
wpf
、
xaml
我
有一个
UserControl
,它
的
DependencyProperty
定义如下:
在
使用此
UserControl
时,
我
希望使用如下所示
的
DistanceText属性
在
XAML
中
手动
设置
: <views:MyControl Dis
浏览 2
提问于2018-03-08
得票数 0
回答已采纳
1
回答
WPF
UserControl
修改渐变部分
c#
、
wpf
、
button
、
user-controls
、
gradient
如果
我
有一个简单
的
用户控件Button,背景就像这样...Offset="1" /></LinearGradientBrush> 有没有办法暴露一个渐变色标,以便使用控件的人
可以
只修改第一个色标
浏览 0
提问于2013-01-05
得票数 0
回答已采纳
1
回答
C# WPF引用自定义控件
xaml
中
的
自定义属性值。
c#
、
wpf
、
xaml
我
有
自己
的
自定义控件,其自定义属性定义如下:{ "X", typeof (CustomProperty), typeof (MyControl), null); { Init
浏览 1
提问于2016-04-28
得票数 0
回答已采纳
1
回答
DependencyProperty
与
UserControl
和WPF对话框有关
的
问题
wpf
、
user-controls
、
dependency-properties
我
已经尽可能地简化了代码,试图得到一段
可以
工作
的
代码,但我仍然很短。请给我一些建议。
我
试图使一个
DependencyProperty
工作,这是如此简单,但我
在
主窗口
设置
的
数据并没有显示在用户控件
中
。
在
MainWindow
中
,
我
在
xaml
中将TextValue
设置
为"hi“。TextValue
在
<em
浏览 1
提问于2018-10-22
得票数 0
回答已采纳
5
回答
在
MyUserControl.
xaml
中
以声明方式
设置
MyUserControl
的
属性
wpf
、
xaml
、
user-controls
假设我们有这样
的
控制:{ InitializeComponent();} 如何在MyUserControl.
xaml
中
以声明方式
设置
"Foo“属性值?<
UserControl
x:Class="Test.
浏览 12
提问于2009-03-18
得票数 3
回答已采纳
1
回答
UWP继承自我
的
用户控件
c#
、
xaml
、
user-controls
、
uwp
、
contentpresenter
我
试图创建一个ModalPage类,它运行良好,但是
我
想创建4个子类来专门化
我
的
ModalPage。
我
的
ModalPage继承自
UserControl
(
XAML
+ C#)。
在
继承自我
的
ModalPage
的
子类上,
我
必须参数化特定
的
内容和标题。
我
想,最好
的
方法是像ContentDialog类一样,使用c#类与Conte
浏览 2
提问于2016-05-02
得票数 1
回答已采纳
1
回答
如何在不同
的
目录
中
设置
到用户控件
的
绑定
wpf
、
wpf-controls
、
binding
到目前为止,当控件和其他对象位于同一目录或同一
xaml
文档
中
时,
我
已经创建并
设置
了它们之间
的
绑定和依赖项。现在,
我
已经创建了一个用户控件,该控件位于我
的
项目的一个名为"Controls“
的
目录
中
,然后使用标记在主
xaml
文档中加载该控件
我
的
问题是如何在用户控件
中
的
对象和主
xaml
文档
中
的</
浏览 0
提问于2010-06-05
得票数 0
回答已采纳
1
回答
控件子控件访问用户控件
的
自定义依赖属性
c#
、
wpf
、
xaml
我
有一个WPF
UserControl
,
我
在其中添加了一个新
的
string依赖项属性。
我
想从ControlTemplate
中
的
另一个控件(图像)
中
访问该属性,该控件是为
UserControl
在其
自己
的
XAML
页面上定义
的
。string将在ControlTemplate
中
图像
的
Source属性上
设置
。
设置
浏览 4
提问于2014-08-20
得票数 0
回答已采纳
5
回答
XAML
中
DependecyProperty到DataContext (ViewModel)
的
绑定
c#
、
wpf
、
mvvm
、
binding
、
dependency-properties
假设是这样
的
情况:<local:MyControl SuperValue="TestValue" /> 此控件具有ViewModel (D
浏览 0
提问于2012-10-24
得票数 4
2
回答
访问用户控件
的
元素
wpf
、
xaml
我
创建了一个
UserControl
,如下所示:x:Class="MySample.MyControl" <
浏览 0
提问于2012-04-03
得票数 10
回答已采纳
1
回答
WinRT
XAML
DataBinding
xaml
、
c#-4.0
、
user-controls
、
winrt-xaml
在
我
的
HubPage上,
我
有一个简单
的
UserControl
,名为TestUserControl。Collection="{Binding TestCollection}“将列表
设置
为
UserControl
中
的
DependencyProperty
。 Text=" name“
设置
属性名。计划是,
我
的
UserControl
浏览 1
提问于2013-12-18
得票数 2
回答已采纳
2
回答
如何:绑定到用户控件
的
DependencyProperty
,当
UserControl
有一个DataContext?
c#
、
wpf
、
xaml
、
datacontext
、
dependency-properties
我
的
问题不是
在
UserControl
中
连接DependencyProperties。这不是问题。当我将
UserControl
中
的
一个按钮绑定到名为TargetCommand
的
UserControl
的
DependencyProperty
上时,当我
在
UserControl
上
设置
一个DataContext有什么办法
可以</em
浏览 9
提问于2011-02-17
得票数 3
回答已采纳
2
回答
在
自定义用户控件中使用
DependencyProperty
更新源代码
wpf
、
user-controls
、
dependency-properties
在
MyUserControl
的
根
XAML
中
,
我
的
绑定如下所示<MyUserControlBase x:Class="MyUserControl" MyDependencyProperty
在
继承
UserControl
的
MyUserControlBase
中
的
注册。
XAML
<em
浏览 1
提问于2012-07-23
得票数 0
回答已采纳
1
回答
尝试将数据化项源绑定到另一个类
中
的
属性
wpf
、
data-binding
、
datagrid
MainWindow有一个数据集,它
的
ItemsSource属性绑定到一个可观察
的
集合(工作正常)。接下来,
我
有一个对话。它
的
目的是
在
一个数据集中显示主窗口中
的
一个可观察集合。对话框在MainWindow
中
实例化。最初,
我
将ObservableCollection传递给对话框
的
构造函数,并将其复制到对话框
的
CLR属性
中
。然后,
我
将将对话框
的
DataContext<
浏览 2
提问于2013-08-29
得票数 0
回答已采纳
4
回答
绑定到用户控件WPF/
XAML
的
依赖项属性
c#
、
wpf
、
xaml
我
的
应用程序看起来是这样
的
: SectionHeaderSectionHeader应用程序是ItemsSource,用于
浏览 6
提问于2011-07-22
得票数 15
回答已采纳
1
回答
WPF UserControls -
在
UserControl
内
的
按钮上
设置
.Command属性
wpf
、
data-binding
、
user-controls
、
command
我
有一个
UserControl
,它包含一个按钮和一些其他控件: <StackPanel> ...</StackPanel>当我创建该控件
的
新实例时,
我
希望获得Button
的
Command属性: <my:GreatUser
浏览 1
提问于2010-05-05
得票数 10
回答已采纳
1
回答
如何动态地(通过代码)添加在WPF中用
XAML
生成
的
自定义控件?
c#
、
wpf
、
xaml
、
user-controls
我
已经通过Visual (和Blend)构建了一个
XAML
“模板”控件,当然它在
XAML
中
。当我搜索如何动态地将控件添加到您
的
界面时,答案总是显示动态构造控件然后添加控件。
我
的
问题是如何添加一个已经制作
的
控件。 一般来说,
我
对WPF和C#非常陌生。也许
我
漏掉了什么。
我
开始思考,
我
可以
用它
的
GUI
在
Visual
中
浏览 0
提问于2019-02-18
得票数 1
回答已采纳
1
回答
未
设置
我
的
用户控件
的
DependencyProperty
c#
、
wpf
、
user-controls
、
dependency-properties
除了
在
DependencyProperty
.Register(...)
中
设置
为默认值之外,
我
不能将
DependencyProperty
设置
为任何其他值
我
有一个包含DataGrid
的
UserControl
我
希望通过
我
的
DependencyProperty
设置
UserControl
中
DataGr
浏览 0
提问于2013-05-04
得票数 0
回答已采纳
1
回答
在
WPF
中
绑定到
UserControl
的
数据-无法获取值
c#
、
wpf
、
user-controls
、
dependency-properties
、
inotifypropertychanged
我
有一个想要实现DataBinding
的
UserControl
。
我
就是不能把输入返回到绑定。>public partial class LabeledTextBox :
UserControl
, INotifyPropertyChanged public
UserControl
中
实现: <uCon:LabeledTextBox x:Name="Toastbread&
浏览 21
提问于2018-07-25
得票数 0
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
NET Core UI框架Avalonia
WPF实现简单的图片放大器
dotnetcore3.1 WPF 实现多语言
Visual Studio 2019 整合 GitHub
通过XAML Islands使Windows桌面应用程序现代化
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券