Telerik Forums
UI for WPF Forum
6 answers
512 views
I am new to WPF Controls, we are using RAD Grid view in my project, this is a touch screen application. my question is .
Is there any way that i can show the horizontal scrollbar on the top of the column header and i want to show the horizontal scrollbar right after the frozen column. not from the begining of the grid.

regards
sarag.
sarag
Top achievements
Rank 1
 answered on 17 Feb 2011
1 answer
222 views
Can someone please explain how to cancel a drop operation? I tried the delayed drag/drop example before with mixed results. It seems now with the latest release things may have changed on how this may be accomplished.

Scenario:
Upon drop, get the slot time and resource in the destination slot. Create update back to the DB. If that update fails, cancel the drop operation and make sure the appoitment ends up in the position where it started.

Thanks,
Rod
George
Telerik team
 answered on 17 Feb 2011
1 answer
523 views
I am trying to do something extremely simple.
I am trying to populate a GridViewComboBoxColumn with a list of numbers ranging from 1 - 16.
This is what I have so far:

<Window x:Class="Login"
        xmlns:systhreading="clr-namespace:System.Threading;assembly=mscorlib"
        xmlns:myNamespace="clr-namespace:myNamespace"
        xmlns:primatives="clr-namespace:System.Windows.Controls.Primitives;assembly=PresentationFramework"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="Login" Height="768" Width="1024" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Window.Resources>
        <Style TargetType="Label">
            <Setter Property="Width" Value="100"></Setter>
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="Width" Value="100"></Setter>
        </Style>
        <myNamespace:TestUser x:Key="testUser"/ >
        <x:Array x:Key="PortValues" Type="sys:Int32">
            <sys:Int32>1</sys:Int32>
            <sys:Int32>2</sys:Int32>
            <sys:Int32>3</sys:Int32>
            <sys:Int32>4</sys:Int32>
            <sys:Int32>5</sys:Int32>
            <sys:Int32>6</sys:Int32>
            <sys:Int32>7</sys:Int32>
            <sys:Int32>8</sys:Int32>
            <sys:Int32>9</sys:Int32>
            <sys:Int32>10</sys:Int32>
            <sys:Int32>11</sys:Int32>
            <sys:Int32>12</sys:Int32>
            <sys:Int32>13</sys:Int32>
            <sys:Int32>14</sys:Int32>
            <sys:Int32>15</sys:Int32>
            <sys:Int32>16</sys:Int32>
        </x:Array>
    </Window.Resources>
    <DockPanel DataContext="{Binding Source={StaticResource testUser}}">
        <StackPanel DockPanel.Dock="Top" VerticalAlignment="Stretch" HorizontalAlignment="Center">
           <telerik:RadGridView Name="RadGridView1" ItemsSource="{Binding FooBars}">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewComboBoxColumn
                       Header="Something"
                       ItemsSource="{Binding Source={StaticResource PortValues}}" />
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </StackPanel>
      
    </DockPanel>
</Window>


This is my "TestUser" and "FooBar" classes that I am using for testing:

Imports System.ComponentModel
Imports System.Collections.ObjectModel
 
Public Class TestUser
 
    Private _fooBars As ObservableCollection(Of FooBar)
 
    Public Property FooBars As ObservableCollection(Of FooBar)
        Get
            Return _fooBars
        End Get
        Set(ByVal value As ObservableCollection(Of FooBar))
            _fooBars = value
        End Set
    End Property
 
    Public Sub New()
        _fooBars = New ObservableCollection(Of FooBar)
        For i As Integer = 0 To 10
            _fooBars.Add(New FooBar("FooBar" + i.ToString, i))
        Next
    End Sub
End Class
Public Class FooBar
    Public Property Value As Integer
    Public Property Name As String
 
    Public Sub New(ByVal name As String, ByVal value As Integer)
        Me.Value = value
        Me.Name = name
    End Sub
End Class


For some reason I cannot get the GridViewComboBoxColumn to populate with the "PortValues" (I can't even get it to appear).
What am I doing wrong?!?!

Thanks a lot for your help!

-Newbie
Maya
Telerik team
 answered on 17 Feb 2011
1 answer
68 views

 

 

 

RadCalendar c = new RadCalendar();
c.FirstDayOfWeek = null;

See the method (RadCalendar.):

private static bool IsValidFirstDayOfWeek(object value)
{
    DayOfWeek? nullable = (DayOfWeek?) value;
    return (Enum.IsDefined(typeof(DayOfWeek), nullable) || !nullable.HasValue); // ???
}

I getting "throw ArgumentNullException: Value cannot be null.Parameter name: value"

Maybe code change to:

private static bool IsValidFirstDayOfWeek(object value)
{
    DayOfWeek? nullable = (DayOfWeek?) value;
    return (!nullable.HasValue || Enum.IsDefined(typeof(DayOfWeek), nullable.Value));
}

Its really working without exceptions!

Kaloyan
Telerik team
 answered on 17 Feb 2011
2 answers
189 views
Hello!

I have a problem: I want to get image from chart on service. I use ExportToImage method to do this. By default - it's work fine. But when I try to apply any style to the chart (i.e. set Axis title style for changing font size, I using Axis.AxisStyles.TitleStyle property) I get following error:

WcfDataService.Code.PdfGenerator - Couldn't get chart snapshot.
System.Windows.Markup.XamlParseException: '11' is not a valid value for the 'System.Windows.Documents.TextElement.FontSize' property on a Setter. ---> System.ArgumentException: '11' is not a valid value for the 'System.Windows.Documents.TextElement.FontSize' property on a Setter.
   at System.Windows.Setter.Seal()
   at System.Windows.SetterBaseCollection.Seal()
   at System.Windows.Style.Seal()
   at System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache)
   at System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.StyleHelper.ApplyTemplatedParentValue(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, DependencyProperty dp, FrameworkElementFactory templateRoot)
   at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot)
   at System.Windows.FrameworkTemplate.InvalidatePropertiesOnTemplate(DependencyObject container, Object currentObject)
   at System.Windows.FrameworkTemplate.HandleBeforeProperties(Object createdObject, DependencyObject& rootObject, DependencyObject container, FrameworkElement feContainer, INameScope nameScope)
   at System.Windows.FrameworkTemplate.<>c__DisplayClass6.<LoadOptimizedTemplateContent>b__3(Object sender, XamlObjectEventArgs args)
   at System.Xaml.XamlObjectWriter.OnBeforeProperties(Object value)
   at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
   at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.Charting.ChartArea.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Chart\ChartArea\ChartArea.Core.cs:line 1318
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Panels\RadDockPanel.cs:line 170
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.Charting.ScalePanel.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Chart\ScalePanel.cs:line 70
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.RadChart.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Chart\RadChart.cs:line 910
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)

Can you help me? What can I do to fix this problem?

Thanks, Anatoly Chekh.
Anatoly Chekh
Top achievements
Rank 1
 answered on 17 Feb 2011
0 answers
146 views
Hello Telerik Team,
                                 I have some problem in Debugging.Here in my WPF project using telerik rad controls.if i am using  windows application mean easily find out error using line by line debugging.

but i am not able to debug wpf project. is it any problem when i am using telerik controls?

sivakanth
Top achievements
Rank 1
 asked on 17 Feb 2011
1 answer
120 views
I want to prevent dragging items to the same level as the root, how do I do this?

thanks.
Petar Mladenov
Telerik team
 answered on 17 Feb 2011
1 answer
126 views
Greetings,

I am trying to upgrade my telerik wpf controls to the latest build according to this article: http://www.telerik.com/help/silverlight/installation-upgrading-from-trial-to-developer-license.html

So first I want to remove telerik controls from gac. And here is the problem. In my VS 2010 I can see telerik libraries in .NET tab when adding a reference (see references.png). But when I try to run gacutil -u Telerik.Windows.Controls.dll as metioned here: http://www.telerik.com/help/wpf/installation-deployment-add-remove-to-gac-wpf.html I get this message: 

No assemblies found matching: Telerik.Windows.Controls.dll
Number of assemblies uninstalled = 0
Number of failures = 0

So how can I upgrade my telerik radcontrols for wpf?

Thank you in advance
Miro

Milan
Telerik team
 answered on 17 Feb 2011
2 answers
127 views
I have added a handler to VisibleRangeChanged event to query the database for appointments within the new date range. However, the appointment source that is updated does not get reflected on the current view. If I switch to another view and back again, I see the appointments.

Is there a way to fix this so that I see my appointments when the AppointmentSource is udpated?

Thanks,
Rod
Hristo
Telerik team
 answered on 17 Feb 2011
7 answers
686 views
This is happening on what appears to be a ListBox inside the filter that contains a CheckBox element for each distinct RowValue in the column.  
When scrolling, the width of the ListBox changes depending upon the size of the widest checkbox in the list.  

Also, the only way to use the scroll bar is to click either the up or down arrow, wait for the ListBox to resize, then click the arrows again.  Attempting to move the actual bar of the ScrollBar does not scroll the ListBox with CheckBoxes, it instead scrolls the bar of the GridView itself. 


Is there a way to set the ListBox width to that of the widest CheckBox?
Anitha
Top achievements
Rank 1
 answered on 17 Feb 2011
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
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?