Telerik Forums
UI for WPF Forum
6 answers
86 views
Hi,
I have a WPF RadGridView and change the row background depend of 2 columns value:

<telerik:RadGridView.RowStyle>
                        <Style TargetType="telerik:GridViewRow">
                            <Setter Property="Background">
                                <Setter.Value>
                                    <MultiBinding Converter="{StaticResource HashToBackgroundConverter}">
                                        <Binding Path="OldSha3Hash"/>
                                        <Binding Path="NewSha3Hash"/>
                                    </MultiBinding>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </telerik:RadGridView.RowStyle>

If both columns have equals value then Background is green, if not then is red.

How I can make a filter to show only green or red rows?

Best regards,
Saykor
Saykor
Top achievements
Rank 2
 answered on 31 Mar 2014
1 answer
220 views
With the following code I'm not getting the pdfviewer working:


<telerik:RadPdfViewer Name="PdfViewer" />


byte[] readAllBytes = File.ReadAllBytes(@"C:/Temp/Invoicer.Data/Rechnungsscans/K4967.pdf");
var memoryStream = new MemoryStream(readAllBytes);
this.PdfViewer.DocumentSource = new PdfDocumentSource(memoryStream, FormatProviderSettings.ReadAllAtOnce);


I'm using the version 2013.2.724.40. Passing the filename hard-coded in the xaml code also not works! Can someone give an hint??
Petya
Telerik team
 answered on 31 Mar 2014
1 answer
214 views
Is there a way to create a custom group header based on the group type?
Martin Ivanov
Telerik team
 answered on 31 Mar 2014
1 answer
154 views
Hello,

Is there a way to inherit the current font settings when pasting text into a RadRichTextBox that was copied from another RadRichTextBox?

If the destination has the text "original text" with Arial font and the source has the text "testing" with no font specified, copying and pasting after "original" should show "original testing text" with Arial font.

The following is what I'm trying:

XAML:
<t:RadRichTextBox Name="txt" Grid.Row="1" FontFamily="inherited" DocumentInheritsDefaultStyleSettings="True"/>
<TextBox Name="html" Grid.Row="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>


Code Behind:

01.public MainWindow()
02.{
03.    InitializeComponent();
04. 
05.    txt.ChangeParagraphSpacingAfter(0);
06.    txt.DocumentContentChanged += TxtOnDocumentContentChanged;
07.}
08. 
09.private void TxtOnDocumentContentChanged(object sender, EventArgs eventArgs)
10.{
11.    UpdateHtml();
12.}
13. 
14.private void UpdateHtml()
15.{
16.    var settings = new HtmlExportSettings();
17.    settings.DocumentExportLevel = DocumentExportLevel.Fragment;
18.    settings.ExportStyleMetadata = false;
19.    settings.StylesExportMode = StylesExportMode.Inline;
20. 
21.    var converter = new HtmlFormatProvider();
22.    converter.ExportSettings = settings;
23.    html.Text = converter.Export(txt.Document);
24.}

The output shows the following:
<p class="Normal "><span style="font-family: 'Arial';">Original </span>testing<span style="font-family: 'Arial';"> text</span></p>

This causes testing to still be "inherited" since it is not inserted as a child of the span with "Original".  Is there any way I can do this or do I need to take over the Paste logic?


Thanks,
Wil
Petya
Telerik team
 answered on 31 Mar 2014
3 answers
98 views
Telerik,

                I have a problem trying to show the GridViewToggleButton in the second level of the Hierarchical Grid, the problem could have been solved if HasHierarchy had a setter. Since this is not achievable through code and because I was able to use WPF Inspector to change the value of HasHierarchy to make the GridViewToggleButton visible, I would like to request you to find me a workaround to solve this issue.

01.<telerikGrid:GridViewToggleButton MinHeight="24" MinWidth="24" IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" telerikGridView:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
02.    <telerikGrid:GridViewToggleButton.Opacity>
03.        <Binding Path="IsExpandable" RelativeSource="{RelativeSource TemplatedParent}">
04.            <Binding.Converter>
05.                <telerik:BooleanToOpacityConverter/>
06.            </Binding.Converter>
07.        </Binding>
08.    </telerikGrid:GridViewToggleButton.Opacity>
09.    <telerikGrid:GridViewToggleButton.Visibility>
10.        <Binding Path="HasHierarchy" RelativeSource="{RelativeSource TemplatedParent}">
11.            <Binding.Converter>
12.                <telerik:BooleanToVisibilityConverter/>
13.            </Binding.Converter>
14.        </Binding>
15.    </telerikGrid:GridViewToggleButton.Visibility>
16.</telerikGrid:GridViewToggleButton>
17.<Border Grid.Column="2" BorderBrush="#FFB3B3B3" BorderThickness="0,0,1,0" telerikGridView:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
18.    <Border.Visibility>
19.        <Binding Path="HasHierarchy" RelativeSource="{RelativeSource TemplatedParent}">
20.            <Binding.Converter>
21.                <telerik:BooleanToVisibilityConverter/>
22.            </Binding.Converter>
23.        </Binding>
24.    </Border.Visibility>
25.</Border>


Regards,
Jerric Lyns John

P.S. The first level Hierarchical Grid works just fine by showing the GridViewToggleButton but when it comes to the second level, it seems somehow internally HasHierarchy is set as False
Yoan
Telerik team
 answered on 31 Mar 2014
7 answers
905 views
Hello,
     I want to programmatically bold the text that appears in first column of my grid.
Thanks
Yoan
Telerik team
 answered on 31 Mar 2014
1 answer
156 views
Hello,

I've got a domain model info class, basically some get-only properties on an INotifyPropertyChanged class. I set the DataContext to an instance of this, but nothing is happening for the RadPropertyGrid. No properties show up.

Question: do the properties need to be settable? Or otherwise have ReadOnlyAttribute attached to them?

Thank ye...

Best regards.
Michael
Top achievements
Rank 1
 answered on 28 Mar 2014
6 answers
162 views

Hi,

I had a separate radpane xaml class, it would dynamically generated radpane if it needs.

My problem is when I bound HeaderName to Header without HeaderTemplate code(where I commented), it is working fine to show headername only. But if I uncommented HeaderTemplate code, I only got image show in the UI, no text.
Below is my code:

<telerik:RadPane x:Class="TemplatorWPF.LoadSource" x:Name="RadPaneSource"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:local="clr-namespace:_ViewModel;assembly=_ViewModel"
             mc:Ignorable="d" Header="{Binding HeaderName}"
             d:DesignHeight="300" d:DesignWidth="300">
        <!--<telerik:RadPane.HeaderTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <Image Source="../Resources/templator - level 1.png" />
                    <TextBlock Text="{Binding HeaderName}"/>
                </StackPanel>
            </DataTemplate>
      </telerik:RadPane.HeaderTemplate>-->
    <telerik:RadPane.Resources>

 

 

 

 

Kalin
Telerik team
 answered on 28 Mar 2014
3 answers
284 views
Hello,

I've got one or more File View Models, I open them through the command pattern and they land in a "Workspace" view model. It has a Files properties that is an observable collection. There is also the concept of Workspace opened documents and/or ActiveDocument, which should cause the corresponding pane to land in a default DocumentHost and/or activate.

Anyhow, as far as I can figure, I need to be inheriting from RadPane in order to cook up any document or tool windows. Which themselves either aggregate our custom UserControl or themselves have the XAML specified.

Is there a tutorial I can study along these lines?

Thank you.

Best regards.
Kalin
Telerik team
 answered on 28 Mar 2014
1 answer
113 views
Hello,
when you leave the mouse cursor over the Minimize button in the Office2013 theme, the tooltip is placed under the ribbon and seems to contain additional empty lines.
Patrick
Kiril Vandov
Telerik team
 answered on 28 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?