小编Kri*_*son的帖子

"System.Windows.Data.Binding"类型的对象无法转换为"System.String"类型

我想知道是否有人可以帮忙.我现在已经半天不停地反对这个问题了,我一定是做错了.我有一个具有许多依赖项属性的自定义控件.

[TemplatePart(Name = InformationBubble.InformationBubbleTitlePart, Type = typeof(TextBlock))]
[TemplatePart(Name = InformationBubble.InformationBubbleProductImagePart, Type=typeof(Image))]

public class InformationBubble : Control 
{
    #region Template Parts Name Constants

    /// <summary>
    /// Name constant for the Information Bubble Title Part
    /// </summary>
    public const string InformationBubbleTitlePart = "InformationBubbleTitleText";

    /// <summary>
    /// Name constant for the Information Bubble Product Image Part
    /// </summary>
    public const string InformationBubbleProductImagePart = "InformationBubbleProductImage";

    #endregion

    #region TemplateParts

    private TextBlock _Title;

    internal TextBlock Title
    {
        get { return _Title; }
        private set
        {
            _Title …
Run Code Online (Sandbox Code Playgroud)

.net data-binding mvvm

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

data-binding ×1

mvvm ×1