Telerik Forums
UI for WPF Forum
1 answer
145 views
Hi,

I would like to show the RibbonView menu entries for customizing the Ribbon in a WPF application in German but found the documentation a little confusing.

>I copied Telerik.Windows.Controls.resources.dll into a de subdirectory of my referenced assemblies.

Do I still have to set the Current Culture? (I did but with no sucess).

The Silverlight documentation says something about a config file.

As I understand the entries should automatically in German (right now they are displayed in English).

Kind regards,
Peter
Tina Stancheva
Telerik team
 answered on 02 May 2013
3 answers
105 views
Hi,

In my wpf application i am using tab control. In first tab i am using list box to show the data and in second tab i am using rad Grid View to show data.

After loading both tabs when i switch the tab from grid view tab to list box then there is no delay in loading that view but when i switch back to the previous tab (Grid View) it takes some delay to load the data .

It seems like when number of rows increses in Rad grid view it creates some performance issues.

In tab switching it should not be a problem if we have loaded it already as it works perfect in listbox.

Is there any property to prevent this repopulation of rad grid view.

Looking forward for your reply .. It is really urgent.

Thanks
Rossen Hristov
Telerik team
 answered on 02 May 2013
6 answers
485 views
Hi
I am creating a gridview columns programmatically (see code below).

Everything is working fine except for a GridViewImageColumn which is not displaying although the data seems to be bound correctly.  I am using the following for testing:

Database: Northwind
Table: Categories:
Column: Picture
SqlServerType image
System.DataType: Byte[]

Thanks
Rich

if (col.DataTypeName == "image")

{

GridViewImageColumn imageCol = new GridViewImageColumn();

imageCol.DataMemberBinding = new Binding(col.ColumnName);

imageCol.Header = col.ColumnName;

if (col.IsHidden == true)

imageCol.IsVisible = false;

imageCol.UniqueName = col.ColumnName;

imageCol.DataType = Type.GetType(col.SystemDataType);

imageCol.FilterMemberType = Type.GetType(col.SystemDataType);

gridQueryResult.Columns.Add(imageCol);

}

else

{

GridViewDataColumn dataCol = new GridViewDataColumn();

dataCol.DataMemberBinding = new Binding(col.ColumnName);

dataCol.Header = col.ColumnName;

if (col.IsHidden == true)

dataCol.IsVisible = false;

dataCol.UniqueName = col.ColumnName;

dataCol.DataType = Type.GetType(col.SystemDataType);

dataCol.FilterMemberType = Type.GetType(col.SystemDataType);

gridQueryResult.Columns.Add(dataCol);

}

Dimitrina
Telerik team
 answered on 02 May 2013
11 answers
247 views
I tried applying Michael Crump's Blog Post, here, to my own code.  Particularly the Group Template stuff.  I now have two Groups shown but my Tiles all disappeared. 

Below is my XAML, what am I doing wrong, everything seems to match up with what he is showing and my Tile's all displayed before I applied the Group stuff.

<Window x:Name="ShellWindow"
        x:Class="Green.ShellView"
        xmlns:cal="http://www.caliburnproject.org">
    <Window.Resources>
        <DataTemplate x:Key="GroupTemplate">
            <TextBlock Text="{Binding}"
                       Foreground="Gray"
                       Margin="20"
                       FontWeight="Bold"
                       FontSize="20"
                       FontFamily="Segoe UI"/>
        </DataTemplate>
        <Style TargetType="telerik:Tile">
            <Setter Property="Margin"
                    Value="20,15,5,0"/>
        </Style>
        <Style TargetType="TextBlock"
               x:Key="TileLabelStyle">
            <Setter Property="FontSize"
                    Value="14"/>
            <Setter Property="FontFamily"
                    Value="Segoe UI"/>
            <Setter Property="Margin"
                    Value="10"/>
            <Setter Property="Foreground"
                    Value="White"/>
            <Setter Property="VerticalAlignment"
                    Value="Bottom"/>
        </Style>
        <Style TargetType="TextBlock"
               x:Key="LiveTileLabelStyle">
            <Setter Property="FontSize"
                    Value="24"/>
            <Setter Property="FontFamily"
                    Value="Segoe UI"/>
            <Setter Property="Margin"
                    Value="5"/>
            <Setter Property="Foreground"
                    Value="White"/>
            <Setter Property="VerticalAlignment"
                    Value="Center"/>
            <Setter Property="HorizontalAlignment"
                    Value="Center"/>
        </Style>
    </Window.Resources>
    <telerik:RadDockPanel x:Name="LayoutRoot"
                          LastChildFill="True">
        <telerik:RadExpander x:Name="UserInfoContainer"
                             ExpandDirection="Up"
                             IsExpanded="True"
                             telerik:RadDockPanel.Dock="Top">
            <telerik:RadExpander.Header>
                <Grid HorizontalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <telerik:Label Content="User Information"/>
                    <Rectangle Grid.Column="1"
                               Height="2"
                               Margin="5,0,0,0"
                               VerticalAlignment="Center"
                               Fill="Gray"/>
                </Grid>
            </telerik:RadExpander.Header>
            <telerik:RadExpander.Content>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Good Day Sir!!!"/>
                    <Ellipse Width="33"
                             Height="33"
                             Margin="5"
                             Fill="Yellow"/>
                    <Ellipse Width="33"
                             Height="33"
                             Margin="5"
                             Fill="Blue"/>
                    <Ellipse Width="33"
                             Height="33"
                             Margin="5"
                             Fill="Red"/>
                </StackPanel>
            </telerik:RadExpander.Content>
        </telerik:RadExpander>
        <telerik:RadTileList x:Name="AppLaunchPad"
                             GroupTemplate="{StaticResource GroupTemplate}"
                             ScrollViewer.HorizontalScrollBarVisibility="Visible"
                             cal:Message.Attach="[Event SelectionChanged] = [Action OpenDoorway($eventArgs)]">
            <telerik:Tile x:Name="PendingAuthTile"
                          Background="BlueViolet"
                          TileType="Single"
                          Group="First">
                <Grid>
                    <TextBlock Text="Pending"
                               Style="{StaticResource TileLabelStyle}"/>
                    <TextBlock x:Name="PendingAuthCount"
                               Text="0"
                               Style="{StaticResource LiveTileLabelStyle}"/>
                </Grid>
            </telerik:Tile>
            <telerik:Tile x:Name="CreateAuthTile"
                          Group="First"
                          Background="Green"
                          TileType="Single"
                          cal:Message.Attach="[Event MouseDoubleClick] = [Action CreateAuth] ">
                <TextBlock Text="Create"
                           Style="{StaticResource TileLabelStyle}"/>
            </telerik:Tile>
            <telerik:Tile x:Name="ModifyAuthTile"
                          Group="Second"
                          Background="CadetBlue"
                          TileType="Single">
                <TextBlock Text="Modify"
                           Style="{StaticResource TileLabelStyle}"/>
            </telerik:Tile>
            <telerik:Tile x:Name="DeleteAuthTile"
                          Group="Second"
                          Background="Sienna"
                          TileType="Single">
                <TextBlock Text="Delete"
                           Style="{StaticResource TileLabelStyle}"/>
            </telerik:Tile>
        </telerik:RadTileList>
    </telerik:RadDockPanel>
</Window>



Thanks,
Vanya Pavlova
Telerik team
 answered on 02 May 2013
2 answers
113 views
Hi,

I have this Error after upgrade in 2013.1.403.40 of RadRichTextBoxRibbonUI:

Method not found: 'Telerik.Windows.Documents.Model.Styles.StylePropertyBase Telerik.Windows.Documents.Model.DocumentElement.GetPropertyDefinition(System.String)




Boryana
Telerik team
 answered on 02 May 2013
4 answers
247 views
As the title mentions the GridView for some reason (not sure when it started), will only accept System.Windows.Controls.ContextMenu as its contextmenu in the design time environment.  Even though the documentation states RadContextMenu was viable.

Also it doesn't not take on the Theme set...

Title Amendment... Designer doesn't fail per se, but merely indicates that the RadContextMenu is correct type for use with the RadGridView very much contradicting the documentation.  Therefore a bug imo.
Vanya Pavlova
Telerik team
 answered on 02 May 2013
1 answer
236 views
Hello All,
   I just wanted to submit a solution I found that allows me to attach a file browser dialog to a textbox field of a data form (see attached example1.png).   Basically I wanted a browse button next to the text box that would open a filedialog and replace the textbox's text property with the selected file's path.   I found this cool class in a blog post ( blogpost )  that allow someone to attach a filebrowser dialog to a textbox and re-engineered it in VB.NET (see the blog posting for the C# version).  I then created a User Control that contains the button and textbox and attaches to a custom filter field.  Next I created a class call DataFormImageFileBrowser that Inherits from the DataFormDataField and replaces the textbox with the user control.  Finally I bound the custom DataFormDataField in the AutoGeneratingField event and viola it works... here my code for the OpenFileDialogEx and the DataFormImageFileBrowser

Imports System
Imports Microsoft.Win32
Imports Telerik.Windows
Imports Telerik.Windows.Controls
 
Public Class OpenFileDialogEx
    Public Shared ReadOnly FilterProperty As DependencyProperty = DependencyProperty.RegisterAttached("Filter", GetType(String), GetType(OpenFileDialogEx), New PropertyMetadata("All documents (.*)|*.*", Sub(d, e) AttachFileDialog(DirectCast(d, TextBox), e)))
    Public Shared Function GetFilter(element As UIElement) As String
        Return DirectCast(element.GetValue(FilterProperty), String)
    End Function
 
    Public Shared Sub SetFilter(element As UIElement, value As String)
        element.SetValue(FilterProperty, value)
    End Sub
 
 
    Private Shared Sub AttachFileDialog(textBox As TextBox, args As DependencyPropertyChangedEventArgs)
        Dim parent = DirectCast(textBox.Parent, Panel)
        ''added this because there was a problem with double binding and it was causing the filebrowser dialog to pop up twice
        Dim tag = TryCast(parent.Tag, String)
        If Not IsNothing(tag) Then Return
        parent.Tag = "already bound"
        AddHandler parent.Loaded, Sub()
 
                                      Dim button = DirectCast(parent.Children.Cast(Of Object)().FirstOrDefault(Function(x) TypeOf x Is Button), Button)
                                      Dim filter = DirectCast(args.NewValue, String)
                                      AddHandler button.Click, Sub(s, e)
                                                                   Dim dlg = New OpenFileDialog()
                                                                   dlg.Filter = filter
                                                                   Dim result = dlg.ShowDialog()
                                                                   If result = True Then
                                                                       textBox.Text = dlg.FileName
                                                                   End If
                                                               End Sub
                                  End Sub
    End Sub
End Class
 
Public Class DataFormImageFileBrowser
    Inherits DataFormDataField
 
    Protected Overrides Function GetControlBindingProperty() As DependencyProperty
        Return TextBox.TextProperty
    End Function
 
    Protected Overrides Function GetControl() As Control
        Dim fd = New OpenFileDialogUC("Image file (pdf,png,gif,jpg,bmp,tif,emf,wmf)|*.pdf;*.png;*.gif;*.jpg;*.bmp;*.jpeg;*.tiff;*.tif;*.emf;*.wmf")
 
        Dim dependencyProperty As DependencyProperty = GetControlBindingProperty()
        If Not IsNothing(DataMemberBinding) Then
            Dim binding = DataMemberBinding
            fd.FileNameTbx.SetBinding(dependencyProperty, binding)
        End If
 
        Return fd
    End Function
End Class


Here is the code for the UserControl:
<UserControl x:Class="OpenFileDialogUC"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:src="clr-namespace:CarWashInventoryManagement"
             mc:Ignorable="d" >
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBox x:Name="FileNameTbx" MinWidth="100" src:OpenFileDialogEx.Filter="{Binding FilterStr}" Grid.Column="0" />
        <Button Grid.Column="1">Browse</Button>
    </Grid>
</UserControl>

and its code behind:
Public Class OpenFileDialogUC
    Public Property FilterStr As String = String.Empty
    Public Sub New(_filter As String)
        FilterStr = _filter
        DataContext = Me
        InitializeComponent()
    End Sub
End Class


here is the code for the AutoGeneratingField for the RadDataForm
ElseIf e.PropertyName = "FileName" Then
        Dim df = New DataFormImageFileBrowser()
        df.Label = e.DataField.Label
        df.DataMemberBinding = e.DataField.DataMemberBinding
        e.DataField = df
        e.DataField.Label = "File Name"

I thought this was pretty cool so I thought I would share...
Maya
Telerik team
 answered on 01 May 2013
4 answers
177 views
Hi,

we've got an issue with the saving functionality of RadDocking.
When I call the RadDocking.SaveLayout() function, it will create a xml like (this is a snippet from the whole file):
<RadSplitContainer Dock="DockedTop" Orientation="Vertical">
    <Items>
        <RadPaneGroup RelativeWidth="100" RelativeHeight="100" SplitterChange="422,180833333333" SelectedIndex="0">
            <Items>
                <RadPane SerializationTag="LineAppearancesPane" IsDockable="True" />
            </Items>
        </RadPaneGroup>
        <RadPaneGroup RelativeWidth="100" RelativeHeight="300" SplitterChange="554,5425" SelectedIndex="0">
            <Items>
                <RadPane SerializationTag="CallControlWheelPane" IsDockable="True" Header="" CanFloat="False" />
            </Items>
        </RadPaneGroup>
    </Items>
</RadSplitContainer>

When I do a loadLayout based on this XML, one of our panes is completely hidden, it looks like it is out of the screen. However, when I change the SplitterChange to 422, it's working correctly again. So it looks like a problem with the huge number of digits within that SplitterChange.

So far, this problem only occurs on the machine of a tester, I couldn't reproduce a savelayout which would give me such a strange splitterchange as well. However, when I load his settings on my machine, I've got the same issue, so it must be in the xml, and somewhere in the savelayout.

We are running RadControls for WPF v.2013.1.220.40
Is this a known issue, or a quick solution/workaround for it? I could read the xml string again and change all SplitterChange values to integers as a temporary workaround, but prefer a more robust solution ;)

Thanks in advance,
Rutger
Rutger Kars
Top achievements
Rank 1
 answered on 01 May 2013
1 answer
52 views
If somehow when min/max values are binded and max value become less than min, it causes huge memory leak
Ves
Telerik team
 answered on 01 May 2013
2 answers
269 views
Hello,
I've started creating custom tool based on resize tool, however I'd like to have:
a) press button -> tool is runnig and changes are applied to image
b) no tool settings window is displayed.

Currently tool settings window with reset button is diplaying (I do not need that)
And Tool is not commiting itself. I would like to automatically commit changes similar to flip or rotate.
Petya
Telerik team
 answered on 01 May 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?