Telerik Forums
UI for WPF Forum
2 answers
449 views

This may be a long-shot as I don't see it documented anywhere, but can I omit the style tag but still trigger the CssClassExporting event. What I need is to pull the extracted styles into a separate css file. I can parse the files manually if need be, but if there is some combination of configuration options I'm missing here please correct me.  Here is what i have at the moment.

 

HtmlFormatProvider provider = new HtmlFormatProvider();            

provider.ExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;          

provider.ExportSettings.StylesExportMode = StylesExportMode.Classes;                      

provider.ExportSettings.SpanExportMode = SpanExportMode.DefaultBehavior;                         

provider.ExportSettings.ExportStyleMetadata = true;          

// Dont export the document styles

provider.ExportSettings.StyleRepositoryExportMode = StyleRepositoryExportMode.DontExportStyles;             

// Export font style as style rather than tag          

provider.ExportSettings.ExportFontStylesAsTags = false;             

// Only create styles which need be             

provider.ExportSettings.ExportLocalOrStyleValueSource = true;             

provider.ExportSettings.CssClassExporting += ExportSettings_CssClassExporting;             

var data = provider.Export(RadDocument);             

Doug
Top achievements
Rank 1
 answered on 17 May 2017
5 answers
107 views

Although I am not using this control in a DataForm, it is definitely derived from DataFormDataField. As you can see I am getting an exception in the Xaml designer.  It compiles fine and displays fine at runtime; however it prevents the Xaml UserControl from displaying in the designer.  I get many, many of these errors.  Can anyone give me a hand with this?

Thanks ahead of time,

Steve

 

Dilyan Traykov
Telerik team
 answered on 17 May 2017
6 answers
402 views
I have RadGridView with SearchPanel set to Visible and IsSearchingDeferred to True. Everything works fine, but I also have Filtered event on GridView and it calculate values for Items on selected page for one column. Event doesn't work for SearchPanel filter and SearchPanel doesn't have own event for this. Is there any way to make it works?
Stefan
Telerik team
 answered on 17 May 2017
5 answers
252 views

Hi,

I am trying to create a GridView with both Cell and CellEdit templates for one of the columns. The problem that I am experiencing is two fold:

1. If I bind the column AND the CellTemplate to the same property, I noticed that the IDadaErrorInfo indexer gets called twice per "Name" cell. This is a problem as the validation logic is not particularly straight forward and starts to create a performance issue once there are few dozen rows:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Name, ValidatesOnDataErrors=True, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <TextBox Text="{Binding Name, ValidatesOnDataErrors=True, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

2. Removing the DataMemberBinding from the column and keeping it in the CellTemplate works fine when it comes to displaying the data, but does not seem to work with the IDataErrorInfo. I can see the indexer get called, however I do not see the validation error reflect in the UI. Which effectively means that the validation can only be shown in CellEditTemplates:

<telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Name, ValidatesOnDataErrors=True, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <TextBox Text="{Binding Name, ValidatesOnDataErrors=True, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

 

What is the correct way of setting up Cell and CellEdit template binding to display IDataErrorInfo errors in both edit and non-edit mode at all times, while not having the IDataErrorInfo indexer getting hit twice as much as it should?

 

Thanks in advance,

Ross

Rostislav
Top achievements
Rank 1
 answered on 16 May 2017
1 answer
150 views
In my tileview I want the user to be able to rearrange any of the tiles except for the very first tile. How can I achieve this?

Is there any sort of property on the tile that can prevent the tile from moving?

 

My tiles Position property is bound to a property in the entity the tile represents. I have tried putting logic in the property set to prevent changes if the position is 0, but that is preventing ANY of the tiles from changing position

 

    <Style TargetType="{x:Type telerik:RadTileViewItem}">
        <Setter Property="Position" Value="{Binding Path=DisplayIndex, Mode=TwoWay}" />
    </Style>

    public int DisplayIndex
    {
        get { return DisplayIndex; }
        set
        {
            if (m_DisplayIndex !=0 && value != DisplayIndex && value > 0)
            {
                m_DisplayIndex = value;
            }
            NotifyPropertyChanged("DisplayIndex");
        }
    }

 

Any ideas or insight? thanks!

Dinko | Tech Support Engineer
Telerik team
 answered on 16 May 2017
2 answers
125 views

Hi,

All I want to do is have the text of the chosen date right aligned in the textbox. I've tried all the different alignment and content alignment options I can think of and nothing works. Can someone please share the magic sauce?

Thanks .... Ed

 

 

<telerik:RadDateTimePicker x:Name="txtOpenDate" Width="175" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left"
 
                       CalendarStyle="{StaticResource calendarStyle}"                                   
                       InputMode="DatePicker" SelectedValue="{Binding OpenedDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }"/>
Randy Hompesch
Top achievements
Rank 1
 answered on 16 May 2017
6 answers
583 views
Hi,

I want to disable the button part of the RadRibbonSplitButton, if the default action is not valid. But at the same time some of the actions in the drop down part are valid. But when I disable the RadRibbonSplitButton, the dropw down "button" is disabled too. So the user can't choose an action from the dropdown.
 
Is it possible to disable the button, but enable the dropdown?

Erik    
Jiri
Top achievements
Rank 1
 answered on 16 May 2017
2 answers
240 views

Hello,

I am having difficulties in creating a RadCartesianChart Series Provider with a chart type of ScatterSplineSeries. In overview website (http://docs.telerik.com/devtools/silverlight/controls/radchartview/features/chartseriesprovider#overview), it states that to use ScatterSplineSeries, I need to use the ScatterSeriesDescriptor. But for some reason, the plot is not showing. I am just randomizing the data points in the viewmodel. If i remove the Style section, it is able to plot a Scatter Series. How do I go about to plot a Scatter Spline Series?

01.<telerik:RadCartesianChart Margin="10">
02. 
03.               <telerik:RadCartesianChart.HorizontalAxis>
04.                   <telerik:LinearAxis />
05.               </telerik:RadCartesianChart.HorizontalAxis>
06. 
07.               <telerik:RadCartesianChart.VerticalAxis>
08.                   <telerik:LinearAxis />
09.               </telerik:RadCartesianChart.VerticalAxis>
10. 
11.               <telerik:RadCartesianChart.SeriesProvider>
12.                   <telerik:ChartSeriesProvider Source="{Binding Data}">
13.                       <telerik:ChartSeriesProvider.SeriesDescriptors>
14. 
15.                           <telerik:ScatterSeriesDescriptor ItemsSourcePath="TransmitCharacterizationItems"
16.                                                            XValuePath="XValue"
17.                                                            YValuePath="YValue">
18. 
19.                               <telerik:ScatterSeriesDescriptor.Style>
20.                                   <Style TargetType="telerik:ScatterSplineSeries">
21.                                       <Setter Property="Stroke" Value="Blue" />
22.                                       <Setter Property="StrokeThickness" Value="1" />
23.                                   </Style>
24.                               </telerik:ScatterSeriesDescriptor.Style>
25. 
26.                           </telerik:ScatterSeriesDescriptor>
27.                       </telerik:ChartSeriesProvider.SeriesDescriptors>
28.                   </telerik:ChartSeriesProvider>
29.               </telerik:RadCartesianChart.SeriesProvider>
30.           </telerik:RadCartesianChart>

 

1.public class SeriesViewModel
2.    {
3.        public string SeriesType { get; set; }
4.        public ObservableCollection<TransmitDataItem> TransmitCharacterizationItems { get; set; }
5.    }

 

1.public class TransmitDataItem
2.    {
3.        public double XValue { get; set; }
4.        public double? YValue { get; set; }
5.    }
Dinko | Tech Support Engineer
Telerik team
 answered on 16 May 2017
7 answers
327 views

Hi,

I am trying to figure out how to show rows and/or columns in the PivotGrid whose cells are empty, so if I have a list of products from an OLAP cube selected, and there are no values for these products with the selected measure(s) - the grid returns no cells and no rows, so I only see the grand total line and nothing else. 

I would prefer all the selected data to be returned. Most pivot grids have an option to toggle this on or off, but I can't seem to find how to do this on the PivotGrid. 

 

Can someone please advise? 

 

Thanks

Polya
Telerik team
 answered on 16 May 2017
1 answer
97 views

Hi to all,

I would add shape that has a big scale, for example 15.000 x 2.440 millimeters.

I don't use Diagram for its native scope, but I would use it for plane a big object. This because these one its measures stored into database.

I wouldn't convert value in little scale.

Can I change scale of diagram to use these values ?

Dinko | Tech Support Engineer
Telerik team
 answered on 16 May 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?