Telerik Forums
UI for WPF Forum
3 answers
205 views
Hi,

I have a special need where I have 2 gridViews side by side. They have their own data source, but always the same number of rows.
I have to adjust the height for each row, and take the vale of the ighest row.

This is needed to ensure that vertical scrolling is always synchronized.

I tried to work with the RowLoaded event, but a this point, the Height is always "NaN" and ActualHeight is always 0.0.

Do you have an idea how I can perform this? Maybe in another event ?

Thanks,
Ben
Boris
Telerik team
 answered on 05 Nov 2014
1 answer
99 views
 Is it possible to realize a hot spot like attached file by RadMap?   Income parameter is  longitude and latitude and count 
Petar Mladenov
Telerik team
 answered on 05 Nov 2014
1 answer
148 views
I am using RadRibbon view.In my Ribbonview some tabs are there.When Click on a tab a usercontrol will load dynamically.Inside this tab there is a ribbon group with abutton.When click this button in the group I trying to visible a panel in the usercontrol.But I didn't get the panel from the group button click.Can anyone help?

Thankd in advance

Here is my code

 <telerik:RadRibbonTab x:Name="rtbDevice" Cursor="Hand" Header="Devices" FontFamily="Arial" FontWeight="Bold" Margin="0,1,0,0" >
               
               <telerik:RadRibbonGroup  Header="Actions" FontWeight="Normal" Margin="0,0,0,-3" Height="95" VerticalAlignment="Top" Width="192" DataContext="DeviceViewModel">

                   <telerik:RadRibbonButton LargeImage="/Images/add-user.png"  Name="btnAddNewDevice" Command="{Binding ElementName=uctrlDeviceList, Path=DataContext.ShowPanelCmd}" 
                                           Size="Large" Text="New" Width="70" Cursor="Hand"
                                            
                                            >
                   </telerik:RadRibbonButton>
                   <StackPanel Margin="0,0,0,-5">
                       <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium"  
                                           SmallImage="/Images/Edit.png" Cursor="Hand"
                                           telerik:ScreenTip.Description="Select  datagrid row  and click edit"
                                           telerik:ScreenTip.Title="Edit" Command="{Binding EditDeviceCommand}" 
                                           Text="Edit" Height="19" />
                       <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" Margin="0,4,0,0"
                        SmallImage="/Images/Duplicate.png" Cursor="Hand" 
                        telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard."
                        telerik:ScreenTip.Title="Duplicate"
                        Text="Duplicate" Height="22" />
                       <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" Margin="0,5,0,0" 
                                           SmallImage="/Images/Delete.png" Cursor="Hand" 
                                           telerik:ScreenTip.Description="Copy formatting from one place and apply it to another.Double-click this button to apply the same formatting to multiple places in the document."
                                           telerik:ScreenTip.Title="Delete"
                                           Text="Delete" RenderTransformOrigin="0.452,0.909" Height="13" />
                   </StackPanel>
               </telerik:RadRibbonGroup>

           </telerik:RadRibbonTab>
Pavel R. Pavlov
Telerik team
 answered on 05 Nov 2014
1 answer
78 views
Hello, I'm using RadCartesianChart.

I write this forum because I need some function.

- When 'Series' is changed ,  axis range of multivertical is changed (at the same time)

And I using RadGridView.

This control's ItemsSource is 'LegendItems' of RadCartesianChart.

I want to operate this.

Automatically, RadGridView is showing refresh effect.

What should I do?

I attached related picture files.
Petar Marchev
Telerik team
 answered on 05 Nov 2014
1 answer
431 views
Hi,

I am working on a project where I need two things to be satisfied:
1. The chart has to be plotted for real-time data where each series on the chart must be smoothly plotted without any synchronization issue.
2. The Observablecollection that contains the list of series to be plotted (which is used to set as datacontext) has to be dynamic, i.e., it must be possible to add/remove the series dynamically.

I'm able to achieve the above features separately but not together, i.e., On adding a new Series dynamically, the chart doesn't show continuous data plot for all the series, even after using Task/Dispatcher. Any suggestion on how should I proceed on this?
Thank you in advance.
Petar Marchev
Telerik team
 answered on 05 Nov 2014
1 answer
407 views
Hello,

We are working on a WPF application. On some screens that seem very simple, load times are very long, even when there is no datas to bind.
I enclose you a basic example with a radGridView. This screen takes about 4 seconds to load on a PC windows 7 64, I5, 4GB RAM.

Can you enlighten us? We do something wrong? How can we improve the loading time?

Best regards.


in XAML :

<Window
x:Class="perfDG.CommandeRepartition"
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="CommandeRepartition"
Loaded="frmRepartition_Loaded"
WindowStartupLocation="CenterScreen"
MaxHeight="700"
x:Name="frmRepartition"
SizeToContent="WidthAndHeight">

<Grid>
   <Grid.RowDefinitions>
     <RowDefinition Height="35"></RowDefinition>
     <RowDefinition></RowDefinition>
     <RowDefinition Height="80"></RowDefinition>
   </Grid.RowDefinitions>

        
    <Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0" Text="Regroupement"></TextBlock>
<ComboBox x:Name="cbbGroupement" Margin="2"
MinWidth="150"
Grid.Row="0" Grid.Column="1"
BorderBrush="Black" BorderThickness="1" Background="White"
ItemsSource="{Binding Path=LstItemGroupementRepartition}"
SelectedValuePath="Valeur"
DisplayMemberPath="Libelle"
SelectionChanged="cbbGroupement_SelectionChanged">
</ComboBox>
<Border Grid.Column="1" Margin="2" BorderThickness="1" BorderBrush="Black"></Border>
</Grid>

<!-- Grille -->

<!-- item source listRepartition is List<T>

        <telerik:RadGridView x:Name="dtaRepartition" Grid.Row="1" ItemsSource="{Binding listRepartition}" Margin="2,0,2,0"
AreRowDetailsFrozen="True"
AutoGenerateColumns="False"
CanUserDeleteRows="False"
CanUserFreezeColumns="False"
CanUserInsertRows="False"
CanUserReorderColumns="False"
CanUserResizeColumns="False"
CanUserResizeRows="False"
CanUserSortColumns="False"
CanUserSortGroups="False"
RowIndicatorVisibility="Collapsed"
ShowColumnHeaders="True"
GridLinesVisibility="Horizontal"
ShowGroupPanel="false"
CanUserSelect="False"
RowDetailsVisibilityMode="Collapsed"
EnableColumnVirtualization="False"
EnableRowVirtualization="False"
ShowGroupFooters="False"
ShowColumnFooters="True"
GroupRenderMode="Flat"
IsFilteringAllowed="False">

<telerik:RadGridView.Columns>

<telerik:GridViewDataColumn DataMemberBinding="{Binding libelleArticle}" Width="400"
UniqueName="libellearticle"
Header="Article" IsReadOnly="True" Focusable="False" Footer="Total"
ShowFieldFilters="False" ShowFilterButton="False" ShowDistinctFilters="False"
/>

<telerik:GridViewDataColumn DataMemberBinding="{Binding delai}" IsVisible="False"
Header="Delai" IsReadOnly="True" Focusable="False"
UniqueName="delai"
DataFormatString="{} {0:dd/MM/yyyy}"
ShowFieldFilters="False" ShowFilterButton="False" ShowDistinctFilters="False"
/>

<telerik:GridViewDataColumn DataMemberBinding="{Binding quantite}" Width="90"
UniqueName="quantite"
Header="Quantité" IsReadOnly="True" Focusable="False"
TextAlignment="Right"
ShowFieldFilters="False" ShowFilterButton="False" ShowDistinctFilters="False"
/>

<telerik:GridViewDataColumn DataMemberBinding="{Binding montant}" Width="120"
UniqueName="montant"
Header="Montant" IsReadOnly="True" Focusable="False"
TextAlignment="Right"
ShowFieldFilters="False" ShowFilterButton="False" ShowDistinctFilters="False"
/>

</telerik:RadGridView.Columns>
</telerik:RadGridView>


<!-- Boutons -->
<Grid Grid.Row="2">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Button x:Name="btnRetour" Margin="10,5" Height="60" Width="80" Click="btnRetour_Click">
<StackPanel>
<TextBlock Text="Retour" ></TextBlock>
</StackPanel>
</Button>
</StackPanel>
</Grid>

</Grid>
</Window>

   
in CS :

// Loading data from a database
// form.datacontext = this




Dimitrina
Telerik team
 answered on 05 Nov 2014
3 answers
739 views
How can I make a RadGrid to always highlight the SelectedItem (or CurrentItem) in full color like in the screen-shot OK.png.

Why does the SelectedItem ist sometimes only have a border like in the other screen-shot (NotOK.png).

I want a behavior like in a ListBox where some item is always "active" (i.e. selected).
Maurizio
Top achievements
Rank 2
 answered on 04 Nov 2014
3 answers
109 views
Hi,

I want to use the TreeListView to display a hierarchical list of 2 or 3 differents types of object. I want to display different columnHearder according with row is selected. I don't want to use Gridviews with rowdetails. I want to have the columnHearders of each rowType in a same position.

How can I achieve this ?

Boris
Telerik team
 answered on 04 Nov 2014
10 answers
507 views
 
 I'm having problems loading an Arabic document into a RadRichTextBox -- the crux of the problem is that if you set the FlowDirection on the RadRichTextBox it puts the scroll bar on the left (where it should be) but it reverses the text. If one sets the FlowDirection to LeftToRight the text is correctly displayed (RTL and right aligned) but the scrollbar is on the right.

 Is this is a known problem or is the some way to load the control to make to correct this?

Thanks,
Scott

 Capture1.png shows a demo app that has a WebBrowser, RichTextBox and RadRichTextBox side by side, note that the text is the same in all controls, but the scrollbar is placed incorrectly on the RadRichTextBox (far right in the image).

 Capture2.png shows the same app with the FlowDirection set to RightToLife; obviously the text is reversed.

 Here's the guts of the code that loads the controls

public MainWindow()
{
    StyleManager.ApplicationTheme = new Windows8Theme();
 
    RadRichTextBox.DefaultTextRenderingMode =
        Telerik.Windows.Documents.UI.TextBlocks.TextBlockRenderingMode.TextBlockWithPropertyCaching;
 
    InitializeComponent();
 
    Loaded += (sender, args) =>
    {
        var htmlContent = File.ReadAllText(@"..\..\Arabic-Lipsum.html");
        MyWebBrowser.NavigateToString(htmlContent);
 
        var sourceConverter = new HtmlFormatProvider();
 
        var converted = sourceConverter.Import(htmlContent);
        MyRadRichTextBox.Document = converted;
 
        var rtf = new RtfFormatProvider();
        var rtfFromHtml = rtf.Export(converted);
 
        using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(rtfFromHtml)))
        {
            MyRichTextBox.Selection.Load(ms, DataFormats.Rtf);
        }
    };
}

 And here's the XAML

<Window x:Class="RightToLeftLoadingProblem.MainWindow"
        Title="MainWindow"
        Width="1250"
        Height="750"
        ResizeMode="CanResizeWithGrip"
        WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid Grid.Row="0" Margin="10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <WebBrowser Name="MyWebBrowser"
                            Grid.Column="0"
                            Margin="5" />
                <RichTextBox Name="MyRichTextBox"
                             FlowDirection="RightToLeft"
                             Grid.Column="1"
                             Margin="5"
                             HorizontalScrollBarVisibility="Auto"
                             VerticalScrollBarVisibility="Auto" />
                <telerik:RadRichTextBox Name="MyRadRichTextBox"
                                        FlowDirection="RightToLeft"
                                        Grid.Column="2"
                                        Margin="5" />
            </Grid>
        </Grid>
    </Grid>
</Window>

 
Svetoslav
Telerik team
 answered on 04 Nov 2014
4 answers
202 views
I need a vertical scale to be displayed next to an image that have a moving png image. I've used a Telerik Vertical Gauge and a Linear Scale but my client doesn't want to see the gauge borders. How can I customize the gauge to remove the borders without making the scale disappear? Visibility and opactiy makes everything invisible so that's not going to work! Thank you. Here's my xaml and images of what I need and what I have! I appreciate your help!

                    <telerik:RadVerticalLinearGauge Grid.Row="2"
                                                    Visibility="Visible" 
                                                    Opacity=".65" 
                                                    Foreground="LightBlue" 
                                                    Background="LightBlue"  
                                                    Margin="15,0,162,0" 
                                                    BorderBrush="LightBlue"  
                                                    BorderThickness = "0,0,0,0">
                        <telerik:VerticalLinearScale Max="{Binding MastScaleMax.Value}" 
                                                     MajorTickRelativeWidth="5" 
                                                     ClipToBounds="True" 
                                                     FontWeight="ExtraBold"  
                                                     Min="-10"  
                                                     MajorTicks="{Binding MastScaleMax.Value,Converter={StaticResource MyIncrementCalculatorConverter}}" 
                                                     MinorTicks="5" 
                                                     BorderBrush="LightBlue" BorderThickness="0,0,0,0" Margin="18,-20,15,0" Height="644" VerticalAlignment="Top">
                            <telerik:Marker x:Name="TopDriveMarker" Opacity="0" telerik:ScaleObject.RelativeWidth="0.1*" 
                                            telerik:ScaleObject.RelativeHeight="0.05*" Width="5" Height="5" 
                                            Value="{Binding ElevatorPosition.Value}" 
                                            telerik:ScaleObject.Location="OverCenter" Margin="0,0,0,0">
                            </telerik:Marker>
                        </telerik:VerticalLinearScale>
                    </telerik:RadVerticalLinearGauge>



Richard
Top achievements
Rank 1
 answered on 04 Nov 2014
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?