Cannot use DockPanel in Silverlight C # project

I'm currently trying to resize the Telerik graph by placing it in the DockPanel, because the text of the Y-axis labels continues to be cut off when the graph is resized using "this.RadChart1.DefaultView.ChartArea.Height" in the hope that this formatting error will be fixed .

The problem I'm currently encountering with a "DockPanel" is that when I added the required link to the silverlight project and completed the declaration in the xaml document, I still cannot access the "DockPanel".

Please refer to my code below ..

xmlns:control="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
Width="700" Height="400"
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">

    <toolkit:DockPanel x:Name="LayoutRoot">
    </toolkit:DockPanel>

With the error message: The type or namespace name "DockPanel" does not exist in the namespace "System.Windows.Controls" (do you miss the assembly reference?)

The requested namespace was installed and reinstalled, but he was still out of luck.

Any ideas? :)

+3
source share
1 answer

I think you are referencing the wrong assembly. It should be:
Xmlns: toolkit = "CLR-space names: System.Windows.Controls; assembly = System.Windows.Controls Toolkit "

+10
source

Source: https://habr.com/ru/post/1733361/


All Articles