Telerik Forums
UI for WPF Forum
3 answers
271 views
Hello,

I have a zoom functionnality in a RadSplitContainer, i would like to place bottom-right my main application window.

I create this splitcontainer in xaml.
<telerik:RadSplitContainer InitialPosition="FloatingOnly" x:Name="ZoomContainer"  
                                  telerik:RadDocking.FloatingSize="200 200"     > 
                <telerik:RadPaneGroup  > 
                    <telerik:RadPane CanDockInDocumentHost="False" CanUserClose="True" x:Name="paneZoom"   
                            DataContext="{Binding DataContext, ElementName=root}" 
                            IsHidden="{Binding DisplayZoom, Mode=TwoWay, Converter={StaticResource convInverseBoolean}}"  
                          Header="Zoom"  > 
                        <!--<Expander IsExpanded="True" Header="Zoom">--> 
                        <Grid x:Name="rootZoom"


Then on Main window load container I'd like tu set programmaticaly the floating location :
private void QDiagram_Loaded(object sender, RoutedEventArgs e) 
   //ZoomContainer.SetValue(RadDocking.FloatingLocationProperty, new Point(132, 10)); 
  RadDocking.SetFloatingLocation(ZoomContainer, new Point(132, 10)); 


But it seems not to work...

Thanks for your help
Aurore

ps : is there a difference between using Object.SetValue(property, value) and type.Setproperty(object, value) ?


George
Telerik team
 answered on 12 Jul 2010
1 answer
169 views
Hi,

When I close the panes of RadDocking at runtime, and then Serialize the layout setting by using SaveLayout method, but the layout setting in XAML format still contain the panes I just closed. Is there any way to solve it?
George
Telerik team
 answered on 12 Jul 2010
7 answers
750 views
Hello!

Is it possible to preserve all selected items in RadGridView after refreshing the data source? The grid ist bound to an observable collection. This collection is completly replaced after an user action. Actually the default behaviour of the grid is to select the first item in collection. I´d like to change this because it annoys the user.

Thank you and with kind regards
Philip
Rossen Hristov
Telerik team
 answered on 12 Jul 2010
3 answers
111 views
Hi,

am saving a layout in XML file. and whenever that form opens am loading same layout after InitializeComponent().
While doing this layout is coming correctly. but whatever contents like grids, buttons are missing from all the panes.

What could be a reason?


Thanks...!!!

Snehal
Top achievements
Rank 1
 answered on 12 Jul 2010
1 answer
75 views
Dear Colleagues,

I have difficulties to use Minimum Property. Here's the XAML:
<Telerik:RadNumericUpDown IsInteger="True" Minimum="0" x:Name="NumericPieces" Value="1" Grid.Column="1" Margin="5" Grid.Row="0"></Telerik:RadNumericUpDown>

Control sets its value to 0 (zero), and the user cannot increase the value. When I remove the Minimum property from the definition, it works fine.

Am I missing something ? (Version : 2010.1.702.35)

Thank you.
Boyan
Telerik team
 answered on 12 Jul 2010
4 answers
826 views

We have a RadGridView with 2 columns.
When we edit a cell or when we are adding a new row, we want to loop through the rows cell[1] to check for duplicates.
We want to do this in...

private void TheGridCellValidating(object sender, GridViewCellValidatingEventArgs e).

We try things like this...

            var grid = (e.Row).GridViewDataControl;
            string value = e.NewValue.ToString();
           
            var rows = grid.ChildrenOfType<GridViewRow>();

            foreach (var row in rows)
            {
                if (row == null) continue;
                if (row.Cells == null) continue;
                if (row.Cells[1] != null)
                {
                    var s = row.Cells[0]......
                    ...
                    ....
                }
            }
But... it won't work.
How can we iterate on the rows and check for duplicates?

Milan
Telerik team
 answered on 12 Jul 2010
1 answer
100 views
Say I have a DataContext with:
ObservableCollection<Toto> m_files = new ObservableCollection<Toto>();
public ObservableCollection<Toto> Filenames
{
    get
    {
        return m_files;
    }
}

For some reason, this code:
<map:InformationLayer ItemsSource="{Binding Filenames}">
    <map:InformationLayer.ItemTemplate>
        <DataTemplate>
            <Canvas map:MapLayer.Location="5, 5" Width="100" Height="100" Background="AliceBlue">
                <TextBlock Text="{Binding}"/>
            </Canvas>
        </DataTemplate>
    </map:InformationLayer.ItemTemplate>
</map:InformationLayer>

crashes with this exception:
System.FormatException was unhandled
  Message=Input string was not in a correct format.
  Source=Telerik.Windows.Controls.DataVisualization
  StackTrace:
       at Telerik.Windows.Controls.Map.Location.Parse(String source) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q1_SP2\Sources\Development\Controls\DataVisualization\Map\Location.cs:line 200
       at Telerik.Windows.Controls.Map.LocationConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q1_SP2\Sources\Development\Controls\DataVisualization\Map\LocationConverter.cs:line 40
       at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
       at Telerik.Windows.Controls.Map.InformationLayer.GetLocationFromItem(Object item) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q1_SP2\Sources\Development\Controls\DataVisualization\Map\Layers\InformationLayer.cs:line 1214
       at Telerik.Windows.Controls.Map.InformationLayer.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q1_SP2\Sources\Development\Controls\DataVisualization\Map\Layers\InformationLayer.cs:line 449
       at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
       at System.Windows.Controls.Panel.reGenerateChildren()
       at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
       at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.OnRefresh()
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.RefreshOverride()
       at System.Windows.Data.CollectionView.RefreshInternal()
       at System.Windows.Data.CollectionView.Refresh()
       at System.Windows.Data.CollectionView.EndDefer()
       at System.Windows.Data.CollectionView.DeferHelper.Dispose()
       at System.Windows.Controls.ItemCollection.SetCollectionView(CollectionView view)
       at System.Windows.Controls.ItemCollection.SetItemsSource(IEnumerable value)
       at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(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, OperationType operationType)
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
       at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
       at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
       at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
       at MS.Internal.Data.DataBindEngine.Run(Object arg)
       at MS.Internal.Data.DataBindEngine.OnLayoutUpdated(Object sender, EventArgs e)
       at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.UIElement.UpdateLayout()
       at System.Windows.Interop.HwndSource.SetLayoutSize()
       at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       at System.Windows.Window.SetRootVisual()
       at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
       at System.Windows.Window.CreateSourceWindowImpl()
       at System.Windows.Window.SafeCreateWindow()
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at WpfApplication1.App.Main() in C:\Users\frederic.souchu\documents\visual studio 2010\Projects\WpfMap\WpfApplication1\obj\x86\Release\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.FormatException
       Message=Input string was not in a correct format.
       Source=Telerik.Windows.Controls.DataVisualization
       StackTrace:
            at Telerik.Windows.Controls.Map.Location.Parse(String source) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q1_SP2\Sources\Development\Controls\DataVisualization\Map\Location.cs:line 185
       InnerException:



Note that replacing the <string> element by any sort of class just works fine!
Regards
Frederic

Andrey
Telerik team
 answered on 12 Jul 2010
1 answer
200 views
Is it possible to hide the drop-down button from the RadTimePicker?
Dani
Telerik team
 answered on 12 Jul 2010
4 answers
140 views
I'm new to WPF and to the Carousel as well, but taking what little examples there are for this control just isn't working for me. Even taking the exact code from your documentation and applying it makes my Carousel disappear.

When trying to view the Style in Expression Blend 4, I get an error "Property values set when no trigger is active". 

The code I have is very simple:

<telerik:RadCarousel x:Name="carousel"
            <Image Source="Images/Puck/1.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/4.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/5.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/6.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/7.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/9.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/10.jpg" Width="200" Height="200" Stretch="Fill" /> 
            <Image Source="Images/Puck/11.jpg" Width="200" Height="200" Stretch="Fill" /> 
        </telerik:RadCarousel> 
        <Grid.Resources> 
            <Style TargetType="{x:Type telerik:CarouselItem}"
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:CarouselItem}"
                            <Border x:Name="border"
                                <VisualStateManager.VisualStateGroups> 
                                    <VisualStateGroup x:Name="ValidationStates"
                                        <VisualState x:Name="Valid"/> 
                                        <VisualState x:Name="InvalidFocused"/> 
                                        <VisualState x:Name="InvalidUnfocused"/> 
                                    </VisualStateGroup> 
                                </VisualStateManager.VisualStateGroups> 
                                <Border x:Name="CarouselItemMainBorder" 
                                    ClipToBounds="False" RenderTransformOrigin="0.5, 1" 
                                    Opacity="{Binding ReflectionSettings.Opacity, RelativeSource={RelativeSource TemplatedParent}}" 
                                    Visibility="{Binding ReflectionSettings.Visibility, RelativeSource={RelativeSource TemplatedParent}}" 
                                    BorderBrush="{x:Null}" BorderThickness="1,1,1,1" CornerRadius="0" SnapsToDevicePixels="True" Margin="0,0,-10,-35" MouseEnter="MouseEnterTest"
                                    <Border.Background> 
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                            <GradientStop Color="#FFC1DCFF" Offset="0"/> 
                                            <GradientStop Color="#FF7EB8F8" Offset="1"/> 
                                        </LinearGradientBrush> 
                                    </Border.Background> 
                                </Border> 
                            </Border> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </Grid.Resources> 

x
Top achievements
Rank 1
 answered on 10 Jul 2010
5 answers
281 views
I followed this link http://www.telerik.com/help/wpf/radtabcontrol-populating-binding-to-collection.html to bind a collection to my tab control. The content is displaying properly but the header is not. My header is still displaying "MiddleLayer.SalesPerson" even though I assigned "Name" to DisplayMemberpath. My code is as below

    <UserControl.Resources>
        <DataTemplate x:Key="salesTemplate">
            <ctrls:AccountSalesPersonUserControl DataContext="{Binding}"></ctrls:AccountSalesPersonUserControl>
        </DataTemplate>
    </UserControl.Resources>

 <telerikPresent:RadTabControl x:Name="SalesPersonTab" ItemsSource="{Binding Path=SelectedItem.SalesPersons, Mode=OneWay}"
                   DisplayMemberPath="Name" ContentTemplate="{StaticResource salesTemplate}" />




Alex Wu
Top achievements
Rank 1
 answered on 10 Jul 2010
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
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
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
CardView
DataBar
WebCam
FilePathPicker
Licensing
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?