【问题标题】:WPF Telerik Controls not Visible in Design ModeWPF Telerik 控件在设计模式下不可见
【发布时间】:2017-04-30 17:35:11
【问题描述】:

我在 WPF/C# 项目中使用 Telerik 框架,并且控件在设计中不可见。当我运行应用程序时,控件(例如,RadButton)显示正常。为什么会这样?虽然默认控件正常工作

    <Window x:Class="TelerikWpfApp4.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            Title="MainWindow" Height="350" Width="525">
<Grid>
    <telerik:RadRadioButton x:Name="radRadioButton" Content="Button" HorizontalAlignment="Left" Height="Auto" IsChecked="False" VerticalAlignment="Top" Width="Auto" Margin="24,42,0,0"/>
    <telerik:RadListBox HorizontalAlignment="Left" VerticalAlignment="Top" Width="250">
        <telerik:RadListBoxItem Content="Item 1"/>
        <telerik:RadListBoxItem Content="Item 2"/>
        <telerik:RadListBoxItem Content="Item 3"/>
    </telerik:RadListBox>
    <telerik:RadToggleButton x:Name="radToggleButton" Content="Button" HorizontalAlignment="Left" Height="Auto" IsThreeState="False" IsChecked="False" VerticalAlignment="Top" Width="Auto"/>
    <telerik:DataFormDateField HorizontalAlignment="Left" VerticalAlignment="Top" Margin="322,85,0,0"/>
    <telerik:RadSplitButton Content="Button" HorizontalAlignment="Left" Height="Auto" IsOpen="False" IsChecked="False" VerticalAlignment="Top" Width="Auto"/>
    <telerik:RadSplitButton Content="Button" HorizontalAlignment="Left" Height="Auto" IsOpen="False" IsChecked="False" VerticalAlignment="Top" Width="Auto"/>
    <telerik:RadRadioButton x:Name="radRadioButton1" Content="Button" HorizontalAlignment="Left" Height="Auto" IsChecked="False" VerticalAlignment="Top" Width="Auto"/>
    <Button x:Name="button" Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="175,142,0,0"/>
    <telerik:RadButton x:Name="radButton" Content="segfsdhshdh" HorizontalAlignment="Left" Height="Auto" VerticalAlignment="Top" Width="Auto" Margin="21,32,0,0"/>

</Grid>

【问题讨论】:

  • 你的问题解决了吗?
  • 我现在也有同样的问题。你找到解决办法了吗?

标签: wpf telerik


【解决方案1】:

我以前遇到过这个问题,它与我使用的引用程序集有关。 Telerik 有两种程序集引用类型 xaml 和 noxaml,一旦我删除了我的引用并用正确的引用替换它们,我就没有问题了。以下是有关该问题的 Telerik 文档的几个链接:

https://docs.telerik.com/devtools/wpf/common-information/troubleshooting/invisible-controls

https://docs.telerik.com/devtools/wpf/styling-and-appearance/xaml-vs-noxaml

【讨论】:

    猜你喜欢
    • 2012-05-11
    • 1970-01-01
    • 1970-01-01
    • 2015-02-13
    • 1970-01-01
    • 1970-01-01
    • 2018-11-09
    • 2011-10-12
    • 2011-05-28
    相关资源
    最近更新 更多