Telerik Forums
UI for WPF Forum
1 answer
267 views

0down votefavorite
1 I had a WPF project work with Kinect hand pointer and want do use Telerik RadCarouselPanel that bind with ListBox. the problem is that the hand pointer scroll speed is too fast, I tried ScrollViewer.CanContentScroll="False" but it break Telerik perspective effect on Listbox. how can I slow it down some how? here is the picture and the code:

 



    <ScrollViewer HorizontalAlignment="Center" Background="Transparent" VerticalAlignment="Center"  VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" Width="1691.381" Height="257.5" Grid.ColumnSpan="4"  Grid.RowSpan="3" Grid.Row="2">
<ListBox x:Name="listBox" Background="Transparent" BorderBrush="Transparent" SelectionChanged="listBox_SelectionChanged" SelectionMode="Single" ItemsSource="{Binding Source={StaticResource NamesTable}}" HorizontalContentAlignment="Center" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Disabled" RenderTransformOrigin="0.5,0.5"  >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<telerik:RadCarouselPanel Name="MyCarousel" HorizontalAlignment="Center" VerticalAlignment="Center" Height="300"  Width="2000"/>
<!--<StackPanel Orientation="Horizontal" />-->
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal"  Height="200" Width="200" >
<Image Margin="3" Source="{Binding pic_path}" RenderOptions.BitmapScalingMode="Fant" RenderOptions.EdgeMode="Aliased"/>
<TextBox Margin="3" Text="{Binding name}" Visibility="Visible"/>

</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Nov 2017
1 answer
244 views

I am working on a gridview and need to change the appearance between the view mode and the edit mode. I tried to create implicit styles with data triggers to change the background color and font color in Header Row, but it did work.  I can't apply data triggers to head row?

 

Thanks.

Sia
Telerik team
 answered on 07 Nov 2017
1 answer
74 views

 

Hi 

I am trying to copy diagram and then paste diagram.

Serialization and Deserialization is good work for copy, paste, create.

 

However, when i try to copy diagram to other view model, Link does not work.

I found this cause that diagram id was changed when copy diagram.

Except for that, All of that are good working.

 

I wonder some solutions to solve this problem. 

Thanks.

Martin Ivanov
Telerik team
 answered on 07 Nov 2017
3 answers
169 views

Hello.

We are currently testing the RadRichTextBox control and due to our specific business needs we cannot use the ribbon UI so we are applying styles programmatically.

We are using the sample code from the documentation which describes how to apply a linked style however it does not work in our case - only the paragraph style is applied but the character one is ignored.

Our environment is VS 2017.

.NET Framework 4.6.2. (tried with 4.5 but got the same result).

Here is the code:

StyleDefinition linkedParagraphStyle = new StyleDefinition();
                linkedParagraphStyle.Type = StyleType.Paragraph;
                linkedParagraphStyle.ParagraphProperties.Background = Colors.Yellow;
                linkedParagraphStyle.DisplayName = "linkedParagraphStyle";
                linkedParagraphStyle.Name = "linkedParagraphStyle";

                StyleDefinition linkedCharStyle = new StyleDefinition();
                linkedCharStyle.Type = StyleType.Character;
                linkedCharStyle.SpanProperties.FontWeight = FontWeights.Bold;
                linkedCharStyle.SpanProperties.FontFamily = new FontFamily("Times New Roman");
                linkedCharStyle.DisplayName = "linkedCharStyle";
                linkedCharStyle.Name = "linkedCharStyle";
                linkedParagraphStyle.LinkedStyle = linkedCharStyle;

                this.textBox.Document.StyleRepository.Add(linkedParagraphStyle);
                this.textBox.Document.StyleRepository.Add(linkedCharStyle);
                this.textBox.ChangeStyleName("linkedCharStyle");

 

No matter how we change the linking and the naming of the styles and linked properties it will not apply the character properties.

Any help would be greatly appreciated.

Regards,

R.F.

Boby
Telerik team
 answered on 07 Nov 2017
7 answers
276 views

Hello,

 

I want to modify the icon that will be showed when a row in RadGridView is not valid. I found topics in yours forum, but just for WinForms, and the used event is not exists in WPF.

For WinForms, the ViewCellFormatting event is used, but I don't find the equivalent event for WPF.

 

Can you help me ?

 

Thank you.

Vladimir Stoyanov
Telerik team
 answered on 06 Nov 2017
9 answers
1.0K+ views
How do I hide the current row highlight of a grid?
Stefan
Telerik team
 answered on 06 Nov 2017
3 answers
173 views

I have several GridViews on my interface and then on one it has a ChildTableDefinition.  I am trying to have the TAB key insert a row if pressed on the end of the last line on each GridView.  I have followed the instructions and created the KeyboardCommandProvider that overrides the ProvideCommandsForKey method. I have then wired up the KeyboardCommandProvider in the code behind

myGrid1.KeyboardCommandProvider = new Commands.TabKeyCommandProvider(myGrid1);

however the definition for my Child Table is done via a DataTemplate

<telerik:RadGridView.ChildTableDefinitions>
    <telerik:GridViewTableDefinition />
 </telerik:RadGridView.ChildTableDefinitions>
 <telerik:RadGridView.HierarchyChildTemplate>
    <DataTemplate>
           <telerik:RadGridView ItemsSource="{Binding custom_identifier}"
                                              x:Name="ChildGrid1"
                                              ShowGroupPanel="False"
                                              AutoGenerateColumns="False">
                          <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding label}"
                                                                            Header="Custom Identifier"
                                                                            IsSortable="True"
                                                                            IsFilterable="False" />
                           </telerik:RadGridView.Columns>
                </telerik:RadGridView>
          </DataTemplate>
 </telerik:RadGridView.HierarchyChildTemplate>

Now as this child Grid is defined in a template, I can not reference it using the x:Name of "ChildGrid1" in the code behind.  So how do I attach the custom Command Provider to this grid?

 

Also - is there an MVVM way of doing this as doing it in Code Behind is not ideal ??

 

Any suggestions welcome

Stefan
Telerik team
 answered on 06 Nov 2017
1 answer
588 views

I have a chart that has two plots on it. I also have a ribbon bar with a few buttons that I'd like to use to control the pan and zoom behaviors of the chart. I'd like to accomplish this exclusively in the XAML file using data triggers. Please excuse the long code snip, but I'd like to provide a complete picture.

 

001.<Grid>
002.        <TabControl ItemsSource="{Binding TotalGradeProfile}">
003. 
004.            <TabControl.ItemTemplate>
005.                <DataTemplate>
006.                    <TextBlock Text="{Binding Name}"/>
007.                </DataTemplate>
008.            </TabControl.ItemTemplate>
009. 
010.            <TabControl.ContentTemplate>
011.                <DataTemplate>
012.                    <Grid>
013.                        <Grid.RowDefinitions>
014.                            <RowDefinition Height="Auto"/>
015.                            <RowDefinition Height="*"/>
016.                        </Grid.RowDefinitions>
017.                         
018.                        <Grid.ColumnDefinitions>
019.                            <ColumnDefinition Width="*"/>
020.                            <ColumnDefinition Width="Auto"/>
021.                        </Grid.ColumnDefinitions>
022. 
023.                        <Ribbon Grid.Row="0"
024.                                Grid.ColumnSpan="2">
025. 
026.                            <RibbonTab Header="Home" KeyTip="H">
027.                                <RibbonGroup x:Name="ZoomAndPanGroup"
028.                                             Header="Zoom and Pan">
029. 
030.                                    <RibbonButton Label="Zoom"
031.                                                  Name="zoomButton"/>
032. 
033.                                    <RibbonButton Label="Pan"
034.                                                  Name="panButton"/>
035.                                </RibbonGroup>
036.                            </RibbonTab>
037.                        </Ribbon>
038.                         
039.                        <telerik:RadCartesianChart x:Name="gradePlot"
040.                                                   Grid.Row="1"
041.                                                   Grid.Column="0"
042.                                                   Margin="2">
043.                             
044.                            <telerik:RadCartesianChart.Behaviors>
045.                                <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True"
046.                                                                ShowTrackInfo="True"
047.                                                                SnapMode="AllClosePoints"/>
048. 
049.                                <telerik:ChartPanAndZoomBehavior ZoomMode="Both"
050.                                                                 PanMode="None"
051.                                                                 x:Name="zoomBehavior"/>
052. 
053.                            </telerik:RadCartesianChart.Behaviors>
054.                         
055.                            <telerik:RadCartesianChart.HorizontalAxis>
056.                                <telerik:LinearAxis SmartLabelsMode="SmartStepAndRange"
057.                                                    IsStepRecalculationOnZoomEnabled="True"
058.                                                    RangeExtendDirection="None"/>
059.                            </telerik:RadCartesianChart.HorizontalAxis>
060. 
061.                            <telerik:RadCartesianChart.VerticalAxis>
062.                                <telerik:LinearAxis SmartLabelsMode="SmartStepAndRange"
063.                                                    IsStepRecalculationOnZoomEnabled="True"
064.                                                    RangeExtendDirection="None"/>
065.                            </telerik:RadCartesianChart.VerticalAxis>
066. 
067.                            <!-- Plot 1 -->
068.                            <telerik:ScatterSplineSeries XValueBinding="Mp"
069.                                                            YValueBinding="RegionGrade"
070.                                                            ItemsSource="{Binding GradeProfiles}"
071.                                                            Stroke="Blue"
072.                                                            StrokeThickness="1">
073. 
074.                                <telerik:ScatterSplineSeries.LegendSettings>
075.                                    <telerik:SeriesLegendSettings Title="Region"/>
076.                                </telerik:ScatterSplineSeries.LegendSettings>
077. 
078.                                <telerik:ScatterSplineSeries.TrackBallInfoTemplate>
079.                                    <DataTemplate>
080.                                        <StackPanel Orientation="Vertical">
081.                                            <TextBlock Text="{Binding DataPoint.XValue, StringFormat=Milepost: {0}}"/>
082.                                            <TextBlock Text="{Binding DataPoint.YValue, StringFormat=Region Grade: {0:0.000}}"
083.                                                        Foreground="Blue"/>
084.                                        </StackPanel>
085.                                    </DataTemplate>
086.                                </telerik:ScatterSplineSeries.TrackBallInfoTemplate>
087. 
088.                                <telerik:ScatterSplineSeries.RenderOptions>
089.                                    <telerik:BitmapRenderOptions/>
090.                                </telerik:ScatterSplineSeries.RenderOptions>
091.                                
092.                            </telerik:ScatterSplineSeries>
093. 
094.                            <!-- Plot 2 -->
095.                            <telerik:ScatterSplineSeries XValueBinding="Mp"
096.                                                            YValueBinding="SubdivGrade"
097.                                                            ItemsSource="{Binding GradeProfiles}"
098.                                                            Stroke="Red"
099.                                                            StrokeThickness="1">
100. 
101.                                <telerik:ScatterSplineSeries.LegendSettings>
102.                                    <telerik:SeriesLegendSettings Title="Subdivision"/>
103.                                </telerik:ScatterSplineSeries.LegendSettings>
104. 
105.                                <telerik:ScatterSplineSeries.TrackBallInfoTemplate>
106.                                    <DataTemplate>
107.                                        <TextBlock Text="{Binding DataPoint.YValue, StringFormat=Subdivision Grade: {0:0.000}}"
108.                                                    Foreground="Red"/>
109.                                    </DataTemplate>
110.                                </telerik:ScatterSplineSeries.TrackBallInfoTemplate>
111. 
112.                                <telerik:ScatterSplineSeries.RenderOptions>
113.                                    <telerik:BitmapRenderOptions/>
114.                                </telerik:ScatterSplineSeries.RenderOptions>
115.                                 
116.                            </telerik:ScatterSplineSeries>
117.                        </telerik:RadCartesianChart>
118. 
119.                        <telerik:RadLegend Items="{Binding LegendItems, ElementName=gradePlot}"
120.                                           BorderBrush="Black"
121.                                           BorderThickness="1"
122.                                           HorizontalAlignment="Right"
123.                                           VerticalAlignment="Top"
124.                                           Margin="0, 0, 2, 0"
125.                                           Grid.Row="1"
126.                                           Grid.Column="0"
127.                                           Background="White"/>
128.                        
129.                        <DataGrid Grid.Row="1"
130.                                  Grid.Column="1"
131.                                  ItemsSource="{Binding GradeProfiles}"
132.                                  AutoGenerateColumns="True"
133.                                  IsReadOnly="True">
134.                        </DataGrid>
135.                    </Grid>
136. 
137.                    <DataTemplate.Triggers>
138.                        <DataTrigger Binding="{Binding ElementName=panButton, Path=IsToggle}"
139.                                     Value="True">
140.                            <Setter TargetName="zoomBehavior"
141.                                    Property="ZoomMode"
142.                                    Value="None"/>
143.                            <Setter TargetName="zoomBehavior"
144.                                    Property="PanMode"
145.                                    Value="Both"/>
146.                        </DataTrigger>
147.                    </DataTemplate.Triggers>
148.                </DataTemplate>
149.            </TabControl.ContentTemplate>
150.        </TabControl>
151.    </Grid>
Martin Ivanov
Telerik team
 answered on 06 Nov 2017
4 answers
284 views

Hello Team,

I am facing one issue while using RadAutoCompleteBox. Wrong mouse cursor is displayed when we type any text in the text box and list is shown.

Please refer attached screen shot for your reference.

 

Please let me know if you need any details futher.

 

Thanks,

Ganesh Sahastrabuddhe

Ganesh
Top achievements
Rank 1
 answered on 06 Nov 2017
0 answers
164 views

Hello Team,

 

Using RadAutoComplete textbox, we are tying to achieve functionality similar to Google search.

We are facing one issue with capital letters.

When we are typing capital letter which is present in the list, the letters are not shown in Capital case, rather they are shown in small case.

I have attached videos, one is of Google, the functionality which we are tying to achieve and second is of the issue. Attached files are jpg, please rename those to mp4.

 

Thanks,

Ganesh Sahastrabuddhe

Ganesh
Top achievements
Rank 1
 asked on 06 Nov 2017
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?