| <UserControl |
| x:Class="Window2" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:local="clr-namespace:XXX.XXX.LoadOnDemand" Background="Transparent"> |
| <DockPanel> |
| <TextBlock DockPanel.Dock="Bottom" TextWrapping="Wrap" FontSize="12"> |
| <Image Source="/XXX;component/LoadOnDemand/Images/logo.png" Height="120" Width="160"></Image> |
| </TextBlock> |
| <TreeView ItemsSource="{Binding Regions}" Background="Transparent" BorderThickness="0" x:Name="MonTreeview"> |
| <TreeView.ItemContainerStyle> |
| <!-- |
| This Style binds a TreeViewItem to a TreeViewItemViewModel. |
| --> |
| <Style TargetType="{x:Type TreeViewItem}"> |
| <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> |
| <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> |
| <Setter Property="FontWeight" Value="Normal" /> |
| <Style.Triggers> |
| <Trigger Property="IsSelected" Value="True"> |
| <Setter Property="FontWeight" Value="Bold" /> |
| </Trigger> |
| </Style.Triggers> |
| </Style> |
| </TreeView.ItemContainerStyle> |
| <TreeView.Resources> |
| <HierarchicalDataTemplate |
| DataType="{x:Type local:affaireModel}" |
| ItemsSource="{Binding Children}" |
| > |
| <StackPanel Orientation="Horizontal"> |
| <Image Width="16" Height="16" Margin="3,0" Source="Images\Region.png" /> |
| <TextBlock Text="{Binding AffaireName}" /> |
| </StackPanel> |
| </HierarchicalDataTemplate> |
| <HierarchicalDataTemplate |
| DataType="{x:Type local:StateViewModel}" |
| ItemsSource="{Binding Children}" |
| > |
| <StackPanel Orientation="Horizontal"> |
| <Image Width="16" Height="16" Margin="3,0" Source="Images\State.png" /> |
| <TextBlock Text="{Binding ChapitreAffaireName}" /> |
| </StackPanel> |
| </HierarchicalDataTemplate> |
| <DataTemplate DataType="{x:Type local:maTacheModel}"> |
| <StackPanel Orientation="Horizontal"> |
| <Image Width="16" Height="16" Margin="3,0" Source="Images\City.png" /> |
| <TextBlock Text="{Binding TacheName}" /> |
| </StackPanel> |
| </DataTemplate> |
| </TreeView.Resources> |
| </TreeView> |
| <Label Height="66" Name="Label1" Width="149">Label</Label> |
| </DockPanel> |
| </UserControl> |
| <telerik:RadCarousel Error is : The element grid in namespace http://schemas.microsoft.com/winfx/2006/xaml/presentation has invalid child element RadCarousel in namepace http://schemas.microsoft.com/winfx/2006/xaml/ list of possible elements expexted..... |
| <QuickStart:ExampleControl x:Class="Telerik.Windows.Examples.Carousel.BringIntoView.Example" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:QuickStart="clr-namespace:Telerik.Windows.QuickStart;assembly=Telerik.Windows.QuickStart" |
| xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
| xmlns:e="clr-namespace:Telerik.Windows.Examples"> |
| <QuickStart:ExampleControl.Resources> |
| <ObjectDataProvider x:Key="objectDataProvider" ObjectType="{x:Type e:ExamplesDB}" MethodName="GetAddressBookSimple" /> |
| </QuickStart:ExampleControl.Resources> |
| <Grid> |
| <telerik:RadCarousel Name="radCarousel" DataContext="{StaticResource objectDataProvider}" ItemsSource="{Binding}"/> |
| </Grid> |
| <QuickStart:ExampleControl.TopRightPanel> |
| <StackPanel> |
| <TextBlock Text="Locate contact" /> |
| <ComboBox DisplayMemberPath="FirstName" DataContext="{StaticResource objectDataProvider}" |
| ItemsSource="{Binding}" HorizontalAlignment="Stretch" ClipToBounds="True" SelectedIndex="0" |
| SelectionChanged="Contact_SelectionChanged" /> |
| </StackPanel> |
| </QuickStart:ExampleControl.TopRightPanel> |
| </QuickStart:ExampleControl> |
I created my slider in code like this:
RadSlider testSlider = new RadSlider();
testSlider.Minimum = -20;
testSlider.Maximum = 40;
testSlider.Orientation = Orientation.Horizontal;
testSlider.IsSnapToTickEnabled = true;
testSlider.IsSelectionRangeEnabled = true;
testSlider.TickPlacement = Telerik.Windows.Controls.TickPlacement.None;
testSlider.TickFrequency = 1;
testSlider.SelectionStart = 0;
testSlider.SelectionEnd = 5;
testSlider.Width = 240;
Canvas.SetLeft(testSlider, 10);
Canvas.SetTop(testSlider, 10);
aMainCanvas.Children.Add(testSlider);
this
.sampleCarousel.SelectedItem = this.sample.Items[index];
if the Item isn't in the view the Carousel doesn't update its view...
For example if the SelectedItem corresponds to item 3 in the collection and I do this
this.sampleCarousel.SelectedItem = this.sample.Items[1];
The carousel view doesn't update
Where is the problem?
Thanks in advance,
Manuel
| Public Sub New() |
| MyBase.New() |
| Me.InitializeComponent() |
| ' Insert code required on object creation below this point. |
| gv1.AutoGenerateColumns = False |
| Dim detailDefinition As GridViewTableDefinition = New GridViewTableDefinition() |
| detailDefinition.Relation = New PropertyRelation("Orders") |
| gv1.TableDefinition.ChildTableDefinitions.Add(detailDefinition) |
| Dim gvdc As GridViewDataColumn |
| gvdc = New GridViewDataColumn |
| gvdc.HeaderText = "One" |
| gvdc.EditorSettings = New ComboBoxEditorSettings |
| gv1.Columns.Add(gvdc) |
| gvdc = New GridViewDataColumn |
| gvdc.HeaderText = "Two" |
| gvdc.EditorSettings = New CheckBoxEditorSettings |
| gv1.Columns.Add(gvdc) |
| gvdc = New GridViewDataColumn |
| gvdc.HeaderText = "Three" |
| gvdc.EditorSettings = New DatePickerEditorSettings |
| gv1.Columns.Add(gvdc) |
| CustomerList = (From c In _cx.Customers.Include("Orders")).ToList |
| Me.gv1.ItemsSource = CustomerList |
| _CurrentCustomer = CustomerList(0) |
| End Sub |
| System.Reflection.TargetInvocationException was unhandled |
| Message="Exception has been thrown by the target of an invocation." |
| Source="mscorlib" |
| StackTrace: |
| at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) |
| at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) |
| at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) |
| at System.Delegate.DynamicInvokeImpl(Object[] args) |
| at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) |
| at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) |
| at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) |
| at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) |
| at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) |
| at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) |
| at Telerik.Windows.Controls.GridView.GridViewCell.RaiseEventEditEnded() in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Cells\GridViewCell.cs:line 1103 |
| at Telerik.Windows.Controls.GridView.GridViewCell.CommitEdit() in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Cells\GridViewCell.cs:line 710 |
| at Telerik.Windows.Controls.GridView.GridViewCell.TryCommitEdit() in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Cells\GridViewCell.cs:line 887 |
| at Telerik.Windows.Controls.GridView.GridViewCell.HandleLostFocus() in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Cells\GridViewCell.cs:line 875 |
| at Telerik.Windows.Controls.GridView.GridViewCell.OnLostFocus(RoutedEventArgs e) in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Cells\GridViewCell.cs:line 640 |
| at System.Windows.UIElement.IsFocused_Changed(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.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata) |
| at System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key) |
| at System.Windows.Input.FocusManager.OnFocusedElementChanged(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.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) |
| at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) |
| at System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value) |
| at System.Windows.Input.KeyboardNavigation.UpdateFocusedElement(DependencyObject focusTarget) |
| at System.Windows.FrameworkElement.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e) |
| at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) |
| at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) |
| at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) |
| at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) |
| at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) |
| at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) |
| at System.Windows.Input.InputManager.ProcessStagingArea() |
| at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) |
| at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp) |
| at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) |
| at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew) |
| at System.Windows.Input.KeyboardDevice.Focus(IInputElement element) |
| at System.Windows.Input.Keyboard.Focus(IInputElement element) |
| at Telerik.Windows.Controls.GridView.GridViewCell.GridViewCell_MouseLeftButtonUp(Object sender, MouseButtonEventArgs e) in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Cells\GridViewCell.cs:line 515 |
| at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) |
| at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) |
| at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) |
| at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) |
| at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) |
| at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e) |
| at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) |
| at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) |
| at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) |
| at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) |
| at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) |
| at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) |
| at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) |
| at System.Windows.Input.InputManager.ProcessStagingArea() |
| at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) |
| at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) |
| at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) |
| at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) |
| at System.Windows.Interop.HwndSource.InputFilterMessage(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 WpfApplication2.App.Main() in C:\Examples\wpfTelerik\WpfApplication2\obj\Debug\App.g.vb:line 62 |
| 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.Reflection.TargetInvocationException |
| Message="Exception has been thrown by the target of an invocation." |
| Source="mscorlib" |
| StackTrace: |
| at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) |
| at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) |
| at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) |
| at System.Delegate.DynamicInvokeImpl(Object[] args) |
| at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) |
| at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) |
| at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) |
| at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) |
| at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) |
| at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) |
| at Telerik.Windows.Controls.GridView.GridViewRow.HandleValueChangedAfterEdit(RadRoutedEventArgs editEventArgs, RecordsChangeListener changeListener) in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Rows\GridViewRow.cs:line 534 |
| at Telerik.Windows.Controls.GridView.GridViewRow.Cell_EditCommitted(Object sender, CellRoutedEventArgs e) in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\Rows\GridViewRow.cs:line 554 |
| InnerException: System.ArgumentNullException |
| Message="Value cannot be null.\r\nParameter name: fieldName" |
| Source="Telerik.Windows.Controls.GridView" |
| ParamName="fieldName" |
| StackTrace: |
| at Telerik.Windows.Controls.GridView.GridViewDataControl.DataError(Object sender, DataErrorEventArgs args) in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\GridViewDataControl.cs:line 929 |
| InnerException: |
