Telerik Forums
UI for WPF Forum
1 answer
135 views
Hi I'm trying to serialize the RadRichTextBox control but I get the following error: "ambiguous match found."
this is my code

Canvas
cvs = new Canvas();
RadRichTextBox rch = new RadRichTextBox();

rch.Width = 100;

rch.Height = 100;

cvs.Children.Add(rch);

string str = System.Windows.Markup.XamlWriter.Save(cvs);


regards
Nicola De Stefano
Iva Toteva
Telerik team
 answered on 23 Dec 2011
1 answer
131 views
Dear Support,

using the RadGridView inside a DataTemplate, the bound SelectedItem becomes null in the first VM
after changing the VM to a second, different, VM of the same type.

  <ContentPresenter Content="{Binding CurrentContentViewModel}">
            <ContentPresenter.Resources>
                <ResourceDictionary>
                    <DataTemplate DataType="{x:Type local:ContentViewModel}">
                        <telerik:RadGridView ItemsSource="{Binding Items}"
                                             SelectedItem="{Binding SelectedItem}" />
                        <!--<ListView ItemsSource="{Binding Items}"
                                  SelectedItem="{Binding SelectedItem}" />-->
                    </DataTemplate>
                </ResourceDictionary>
            </ContentPresenter.Resources>
        </ContentPresenter>

Alternatively i tried ListView, which behaves as expected.

Is this a bug or am I doing wrong?

Find here a solution that reproduces this behaviour.

TestRadGridViewSelectedItem.zip

Version is: 2011.3.1116.40 / Runtime is v4.0.30319

Thanks Martin
Nedyalko Nikolov
Telerik team
 answered on 23 Dec 2011
5 answers
1.2K+ views
Hi there

Could anyone please tell me how can I enable my RichTextBoxRibbonUI to insert an image using an absolute URL as the source.

Instead of the OpenFileDialog, I want to type http://www.host.com/images/image.jpg

I saw this post here:
http://www.telerik.com/community/forums/silverlight/richtextbox/inserting-an-image-in-the-radrichtextbox.aspx

But sitll have no idea how to implement it, on both xaml and .cs sides.

Thanks

Emerson de Mello
Iva Toteva
Telerik team
 answered on 22 Dec 2011
1 answer
77 views
Hi, I can“t set visibility appointments delete button to collapsed. How can i get it? thanks for your support.
Rosi
Telerik team
 answered on 22 Dec 2011
2 answers
140 views
In our Radmap we have an InformationLayer and a SpatialDataReader.
We display regions as polygons.
How can we use a TextBlock or a label to show the RegionName in the polygon.
We tried making a DataTemplate but it would not work...

<telerik:InformationLayer x:Name="MyLayer">
                    
   <telerik:InformationLayer.Reader>
        <telerik:SqlGeospatialDataReader x:Name="MyReader"  Source="{Binding}" 
                                         GeospatialPropertyName="RegionGeometry" ToolTipFormat="RegionName">
        </telerik:SqlGeospatialDataReader>
   </telerik:InformationLayer.Reader>
					
   <telerik:InformationLayer.ShapeFill>
					    <telerik:MapShapeFill Fill="#50CCFF66" Stroke="Orange" StrokeThickness="3" />
    </telerik:InformationLayer.ShapeFill>
				
</telerik:InformationLayer>
Rieni De Rijke
Top achievements
Rank 1
 answered on 22 Dec 2011
0 answers
83 views
Actually i ran into a problem like User should be able to type Dates in MMddyy format(100105).once the control is lost its focus i have to show it like 10/01/2005.but the problem i face here is the DatePicker shows the previous value if i try to key-in 100105(MMddyy). can u pls privide me a suggestion how i could complete this.
joseph
Top achievements
Rank 1
 asked on 22 Dec 2011
2 answers
177 views
Hi,

I have a floating pane "LeftPane" that needs to act like photoshop tool palette.The pane is floating and its location is set as expected, but its size can not go under 84px.I tried all the possible ways of resizing the pane,the pane group,and the tool window to 26px but none of this worked and the floating pane width is always ~84px while resizing would work if i am setting to a bigger size (e.g 150px).

<telerik:RadDocking Grid.Row="1" HasDocumentHost="False" x:Name="radDocking" AllowUnsafeMode="True" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"  ClipToBounds="True" Margin="0,0,0,0" PaneStateChange="radDocking_PaneStateChange">
 
 
           <telerik:RadSplitContainer  InitialPosition="DockedTop" Orientation="Horizontal"  VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" telerik:RadDocking.FloatingSize="26,300" telerik:RadDocking.FloatingLocation="7,200"
   >
               <telerik:RadPaneGroup Name="LeftPaneGroup"  telerik:ProportionalStackPanel.RelativeSize="20, 500">
                   <telerik:RadPane PaneHeaderVisibility="Collapsed" Name="LeftPane" prism:RegionManager.RegionName="LeftRegion">
 
                   </telerik:RadPane>
 
               </telerik:RadPaneGroup>
               <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="80, 500" >
                   <telerik:RadPane Name="ContentPane"  VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
 
 
                       <ContentControl prism:RegionManager.RegionName="ContentRegion"/>
 
                   </telerik:RadPane>
 
               </telerik:RadPaneGroup>
           </telerik:RadSplitContainer>
       </telerik:RadDocking>

private void radDocking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)
       {
           if (e.OriginalSource == LeftPane)
           {
               if (LeftPane.IsFloating)
               {
                   LeftPane.CanUserClose = false;
                   LeftPane.MaxWidth = 26;
                   LeftPane.Width = 26;
                   LeftPane.PaneHeaderVisibility = System.Windows.Visibility.Collapsed;
                   ToolWindow window = LeftPane.ParentOfType<ToolWindow>();
                   if (window == null)
                   {
                       window = (((LeftPane.Parent as RadPaneGroup).Parent as RadSplitContainer).Parent) as ToolWindow;
                   }
                   window.Width = 26;
                   window.MaxWidth = 26;
                   LeftPaneGroup.Width = 26;
                   LeftPaneGroup.MaxWidth = 26;
               }
           }
       }

Thanks in advance

Madani
DMC Helpdesk
Top achievements
Rank 1
 answered on 22 Dec 2011
3 answers
108 views
Hi,

We are about to embark on restyling an application and we are using WPF controls. We have decided to use the metro theme as a base theme but have quite a few style changes to make to the controls within this. Mainly colour changes. What is the advised way forward for this? Do we duplicate the metro theme and then edit that or do we tackle it on a control by control basis with Expression Blend? I am new to WPF so could do with some best practice advice.

Deb
Vanya Pavlova
Telerik team
 answered on 22 Dec 2011
3 answers
107 views
I want to add Strings beneath my chart, i dont understand why this doesnt work.

my       sm.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XValue));
Should Show GAS for no.1 and Electricity for no.2
But i cant get it working? im sending u a picture in the picture u can see that the first number is gas and the value for this week and last week and same for number two. I want to change the names to GAS and Electricity
 


 public void GenerateChart()
        {
            SeriesMapping sm = new SeriesMapping();
            sm.LegendLabel = "Comparrison of the Past 7 days, with the folowoing 7 days (€)";
    smartHomeChart.DefaultView.ChartTitle.Content = "Comparison Chart";
            smartHomeChart.DefaultView.ChartLegend.UseAutoGeneratedItems = false;


            ChartLegendItem item1 = new ChartLegendItem();
            item1.Label = "Previous week";
            item1.MarkerFill = new SolidColorBrush(Colors.LightSkyBlue);
            smartHomeChart.DefaultView.ChartLegend.Items.Add(item1);


       
            ChartLegendItem item2 = new ChartLegendItem();
            item2.Label = "This week";
            item2.MarkerFill = new SolidColorBrush(Colors.PaleVioletRed);
            smartHomeChart.DefaultView.ChartLegend.Items.Add(item2);


            smartHomeChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
            smartHomeChart.DefaultView.ChartArea.AxisX.AutoRange = false;
            smartHomeChart.DefaultView.ChartArea.AxisX.MinValue = 40839.00;
            smartHomeChart.DefaultView.ChartArea.AxisX.MaxValue = 40845.00;


            smartHomeChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;
            smartHomeChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd-MMM";
            sm.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XValue));
            sm.ItemMappings.Add(new ItemMapping("DezeWeek", DataPointMember.YValue));
            sm.ItemMappings.Add(new ItemMapping("VorigeWeek", DataPointMember.YValue));
            smartHomeChart.SeriesMappings.Add(sm);

            smartHomeChart.DefaultView.ChartLegendPosition = Dock.Bottom;
        }
Giuseppe
Telerik team
 answered on 22 Dec 2011
2 answers
126 views
Hi,

I can not understand what is logical difference between Properties ItemsSource and SeriesMappings on a RadChart control.

I understand what ItemsSource is made for, but do not understand what SeriesMappings is made for?

Please help me to resolve this issue.

Regards
Sirum
Sirum
Top achievements
Rank 1
 answered on 22 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?