Telerik Forums
UI for WPF Forum
2 answers
465 views
hi there,

I'm loading a bunch of JPG files in one ListBox and then when the final user do doble-click mouse event my aim is just load the one JPG into Telerik control.
How can I do that??


Private Sub ListBox_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
 
       Dim s As String = ""
 
       BodyWorkAndPaintingTool.?????????????  = TryCast(sender,ListBox).Items(0).ToString
   End Sub


  <telerik:RadImageEditorUI x:Name="BodyWorkAndPaintingTool" ContextMenuOpening="BodyWorkAndPaintingTool_ContextMenuOpening" Grid.ColumnSpan="4" Margin="10,49,33,10" Grid.Row="1" Grid.RowSpan="4">
            <telerik:RadImageEditorUI.ImageToolsSections>
                <telerik:ImageToolsSection Header="{Resx DisenadorBlur}"  >
 
                    <telerik:ImageToolItem ImageKey="Resize" Text="Resize" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
                        <telerik:ImageToolItem.CommandParameter>
.....
.....
.....

Thanks in advance,
Petya
Telerik team
 answered on 12 Sep 2013
2 answers
174 views
Hi -

I have 2 user controls which are bound to the same ViewModel. See attached diagram. I am using the Aggregate Functions to get Sum,Count and average. 
UC2 - where the grid exists - doesnt need to show these aggregate values
UC1 - has textboxes which will be displaying the aggregate values. 

Since they both have the datacontext of the a same CommonViewModel - how can i set a property from UC2 of an aggregate value to a ViewModel Property - so then be leveraged in UC1. 

Obviously if I had to show the values in UC2 directly - then i can do XAMl based simple stuff like this - but this doesnt help me here - since I want to show these values in UC1 (and not UC2)
<StackPanel Grid.Row="1">
           <TextBlock Margin="10,0,0,0" Text="{Binding AggregateResults[\AppCount\].FormattedValue, ElementName=FIBRE_App_Stats}" />
           <TextBlock Margin="10,0,0,0" Text="{Binding AggregateResults[\GrandTotal\].FormattedValue, ElementName=FIBRE_App_Stats}" />
 </StackPanel>


Am attaching a complete working sample solution also to highlight the issue. Please see the CommonViewmodel and the 3 properties in there which i want to set with the aggregate value calculated from the gird in UC2.

Link for the working solution is as follows (since i cant upload it here) - https://github.com/pratikrshah/telerikaggsample


Can somebody please help

Thanks
Dimitrina
Telerik team
 answered on 12 Sep 2013
3 answers
302 views
Hello! 

I use EditorTemplate property of PropertyDefinition class for showing a combobox with instances of some class to set property value. It works well but - is it possible to use the same way for properties shown in the property grid inside CollectionEditorPicker control? Or maybe another way to get the same effect.

Thanks in advance,
Mikhail
Mikhail
Top achievements
Rank 1
 answered on 12 Sep 2013
6 answers
265 views
Hi,

I am trying to use RadRibbonView inside my user control.
And since RadRibbonView does not work unless we include RadRibbonWindow, I have tried to add it to my User control.

It is always giving exception.
"Set property 'System.Windows.Controls.ContentControl.Content' threw an exception.' Line number '6' and line position '14'."

Here is my Code:(XAML:)

<UserControl x:Class="TestTelerikRibbonApp.UserControlTab1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             Name="UCTestTab1"
             mc:Ignorable="d" 
             d:DesignHeight="330" d:DesignWidth="488">    
    
    <telerik:RadRibbonWindow>
        <telerik:RadRibbonView x:Name="rbvTest">
            <telerik:RadRibbonTab Header="RadRibbon" HorizontalAlignment="Left" Margin="0,0,0,0" Name="radRibbonTab" VerticalAlignment="Top">               
                <telerik:RadRibbonGroup Header="Home" Name="rgHome">
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
        </telerik:RadRibbonView>
    </telerik:RadRibbonWindow>
</UserControl>

Madhu
Top achievements
Rank 1
 answered on 12 Sep 2013
1 answer
281 views

Hello,

I‘d like to show  xml data (with xsd) in a RadGridView and edit its value. The values in the grid should allow only this data, which are allowed in xsd. For instance, for enum type I would like to have a ComboBox column.

 

In Xaml I have a following code:

 

<telerik:RadGridView x:Name="dataGrid" AutoGenerateColumns="True" CanUserResizeRows="True"> 
</telerik:RadGridView>
 
The xml data is loaded in a DataSet and connected to the grid:
 
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var data = new DataSet();
            data.ReadXmlSchema(@"D:\Development\Data\IBISConfig.xsd");
            data.ReadXml(@"D:\Development\Data\IBISConfig.xml");
 
            dataGrid.DataMember = data.Tables[data.Tables.Count - 1].TableName;
            dataGrid.ItemsSource = data;
        }
 
 
The Xml file is shown as a hierachical data, but the data types in the columns are always strings. 
 
How can I change the column type, without to parse the xsd?

Best Regards
Marian
 
Dimitrina
Telerik team
 answered on 12 Sep 2013
2 answers
122 views
I want to allocate in ClipBoard object the selected row:
xaml:

<telerik:RadGridView x:Name="dgvOrdenes" ShowGroupPanel="False" ShowColumnHeaders="True" ShowColumnFooters="False"
                            ItemsSource="{Binding V_Or2}" HorizontalAlignment="Left"
                            Margin="10,44,-83,0" ShowInsertRow="False" VerticalAlignment="Top" Height="216"
                            Width="810" Grid.RowSpan="4" AutoGenerateColumns="False" Grid.ColumnSpan="3" >
 
           <telerik:RadGridView.Columns>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding [Or]}" Header="{Resx RadGridViewOr_Or}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Alta}" Header="{Resx RadGridViewOr_Alta}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Cierre}" Header="{Resx RadGridViewOr_Cierre}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Matricula}" Header="{Resx RadGridViewOr_Matricula}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Modelo}" Header="{Resx RadGridViewOr_Modelo}" />
           </telerik:RadGridView.Columns>
 
           <ContextMenuService.ContextMenu>
               <ContextMenu>
 
                   <MenuItem Click="MenuItem6_Click" Header="copy row" >
                       <MenuItem.Icon>
                           <Image Source="/Imagenes/bullet-blue-icon.png" Height="10" Width="10"/>
                       </MenuItem.Icon>
                   </MenuItem>
 
 
               </ContextMenu>
           </ContextMenuService.ContextMenu>
 
 
       </telerik:RadGridView>


code-behind: (it does fails)
Private Sub MenuItem6_Click(sender As Object, e As RoutedEventArgs)
 
       Clipboard.SetData(DataFormats.Text, TryCast(Me.dgvordenes.ItemContainerGenerator.ContainerFromItem(Me.dgvordenes.SelectedItem), R)
 
 
 
 
   End Sub
Enric
Top achievements
Rank 1
 answered on 12 Sep 2013
2 answers
189 views
Hi,

in your OrgChart example i found a way to Export the diagram to png or html. Two questions:

1) why ist the Background of the Image black if i Export the Diagramm to png?
2) where do i find the "HTMLExportHelper.CreateHTMLFile(this.diagram);" HTMLExportHelper?

Thanks
Best Regards
Rene
ITA
Top achievements
Rank 1
 answered on 12 Sep 2013
2 answers
199 views
Hi,

I am hosting a radgridview in a RadDocumentPane,  The gridview's source is set by code and can change dependent on user selection.  I would like the radgridview height to size to the RadDocumentPane so that the scrollbars would show automatically and the radgridview would not extend beyond the bottom of the RadDocumentPane.  I have not been able to acheive this, would you please advice me on this.

Regards,
Joe

 <telerik:RadDocking   BorderThickness="0" Padding="2">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer  >
                    <telerik:RadPaneGroup>
                        <telerik:RadDocumentPane  telerik:StyleManager.Theme="Office_Black" x:Name="optpnl" Width="400" >
                            <StackPanel Orientation="Vertical" >                        
                                <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"  >
                                    <telerik:RadGridView x:Name="InfoGrid" RowHeight="10.5" telerik:StyleManager.Theme="Office_Black"
                                AutoGenerateColumns="True" ShowGroupPanel="False"  AlternateRowBackground="LightBlue"  AlternationCount="2"
                                IsReadOnly="False" IsFilteringAllowed="False" RowIndicatorVisibility="Collapsed"
                                CanUserReorderColumns="True" CanUserSortColumns="False" Padding="0" Margin="2,2,2,2">
                                    </telerik:RadGridView>
                                </ScrollViewer>
                                <telerik:RadBusyIndicator x:Name="busyInd"  telerik:StyleManager.Theme="Office_Black"  ></telerik:RadBusyIndicator>
                            </StackPanel>
                        </telerik:RadDocumentPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>
Joe Bohen
Top achievements
Rank 1
 answered on 12 Sep 2013
1 answer
69 views
We are trying to build a FilterDestriptor with FilterValues in German format for numeric decimal Values.

In German Culture ("de-DE") the double value 0.1 is written 0,1 (with comma), but FilterDesriptor will not parse this correctly although the thread's CurrentCulture is German. So "0,1" will be parsed incorrectly as 1.0D when using the constructor to build a FilterDescriptor:

FilterDescriptor mydescriptor = FilterDescriptor(FilterMember, FilterOperator, "0,1", FilterIsCaseSensitive);

Where can I set the culture to use for number conversion???
Rossen Hristov
Telerik team
 answered on 12 Sep 2013
1 answer
137 views
Hi, 

after updateing to the most current internal build I get the error
ArgumentException: 'Windows8' is not a valid value for the 'Telerik.Windows.Controls.StyleManager.Theme' property on a Setter.

The File producing this looks like this (and worked before):


<ResourceDictionary
    xmlns:XTelerik="clr-namespace:XControlsWPF.XTelerik;assembly=XControlsWPF">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/XControlsWPF;component/Styles.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/XDiagramWPF;component/Assets/XDiagramStyles.xaml"/>
        <!--       
        <telerik:Windows8ResourceDictionary/>
        -->
    </ResourceDictionary.MergedDictionaries>
    <telerik:Windows8Colors x:Key="Windows8Colors" />
    <SolidColorBrush x:Key="AccentBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.AccentColor}" />
    <SolidColorBrush x:Key="BasicBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.BasicColor}" />
    <SolidColorBrush x:Key="StrongBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.StrongColor}" />
    <SolidColorBrush x:Key="MainBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MainColor}" />
    <SolidColorBrush x:Key="MarkerBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MarkerColor}" />
    <SolidColorBrush x:Key="ValidationBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.ValidationColor}" />
 
    <Style TargetType="{x:Type XTelerik:XCheckButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type XTelerik:XButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type telerik:RadToggleButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type Button}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type telerik:RadButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
 
    <Style TargetType="{x:Type telerik:RadBusyIndicator}" BasedOn="{StaticResource DarkBusyBackgroundStyle}" />
 
    <Style TargetType="TextBox">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}" />
    </Style>
    <Style TargetType="Grid">
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}" />
    </Style>
</ResourceDictionary>

Manfred
Yana
Telerik team
 answered on 12 Sep 2013
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?