Telerik Forums
UI for WPF Forum
2 answers
127 views
When I open my project it is constantly reminding me that my project doesn't use the latest version of the WPF controls. But I can't seem to permanently turn off this notification. I can only tell it to remind me later.

Is there away to tell the extension not to remind me again for this project? When the time comes that I want/need to update, I will do a manual update. This project is source controlled on TFS so I'd rather not use an automatic update.
Rayne
Top achievements
Rank 1
 answered on 29 Oct 2012
0 answers
539 views
The new update to my trial version contains binaries for WPF40 and WPF45.  I am using VS 2010.  Which should I use; WPF40 or WPF45?
Rob
Top achievements
Rank 1
 asked on 29 Oct 2012
3 answers
184 views
There seems to be a Bug within the MaskedTextInputControl. When I set the Mask to Alphanumeric ( f.e. a20 ) I can hit return to break the line. When Setting Mask to literals ( f.e. l20 ) this behavior disappers.

Is there a known workaround so I can set my TextInput to alphanumeric without being able to break the line ?

Bug can be easily reproduced at the Demo

See here : http://s1.directupload.net/file/d/3048/o8ymta7s_jpg.htm
Tina Stancheva
Telerik team
 answered on 29 Oct 2012
0 answers
222 views
What's wrong with this code???
why binding doesn't work???
Check the attachment.


public class UcMetadataPropertyGrid : RadPropertyGrid
    {
        public UcMetadataPropertyGrid(MetadataCollection col)
        {
            foreach (Metadata data in col)
            {
                PropertyDefinition def = new PropertyDefinition();
                def.DisplayName = data.Name;
                //def.Binding = new Binding("StringValue");
                //def.Binding.Source = data;
                //def.Binding.Mode = BindingMode.TwoWay;
                def.EditorTemplate = CreateEditor(data);
                this.PropertyDefinitions.Add(def);
            }
        }

        private DataTemplate CreateEditor(Metadata metadata)
        {
            var dt = new DataTemplate();
            var textbox = new RadWatermarkTextBox() { Name = "cp" };
            textbox.Text = "{Binding Path=StringValue}";
            var binding = new Binding
            {
                Path = new PropertyPath("StringValue"),
                Mode = BindingMode.TwoWay,
                UpdateSourceTrigger = UpdateSourceTrigger.LostFocus,
                Source = metadata
            };
            textbox.SetBinding(Metadata.StringValueProperty, binding);

            //dt.VisualTree = textbox;
            //dt.Seal();
            return dt;
        }

        private DataTemplate CreateEditor()
        {
            var sb = new StringBuilder();
            sb.Append("<DataTemplate ");
            sb.Append("xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' ");
            sb.Append("xmlns:controls='clr-namespace:Nezam.DigitalVideoArchive.UI.Controls;assembly=Nezam.DigitalVideoArchive.UI' ");
            sb.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>");
            sb.Append("<Grid>");
            sb.Append(@"<TextBox Text=""{Binding StringValue,Mode=TwoWay}"" />");
            sb.Append("</Grid>");
            sb.Append("</DataTemplate>");
            
            return (DataTemplate)System.Windows.Markup.XamlReader.Parse(sb.ToString());
        }
    }



public MainWindow()
        {
            InitializeComponent();

            MetadataCollection col = new MetadataCollection();

            StringMetadata sm = new StringMetadata();
            sm.Name = "StringMetadata";
            sm.StringValue = "Amin";
            col.Add(sm);

            BoolMetadata bm = new BoolMetadata();
            bm.Name = "BoolMetadata";
            bm.Value = true;
            col.Add(bm);

            GuidMetadata gm = new GuidMetadata();
            gm.Name = "GuidMetadata";
            gm.Value = Guid.NewGuid();
            col.Add(gm);

            DateTimeMetadata dm = new DateTimeMetadata();
            dm.Name = "DateTimeMetadata";
            dm.Value = DateTime.Now;
            col.Add(dm);


            UcMetadataPropertyGrid pg = new UcMetadataPropertyGrid(col);
            //pg.FlowDirection = System.Windows.FlowDirection.RightToLeft;
            this.Grid1.Children.Add(pg);
        }
Amin
Top achievements
Rank 1
 asked on 29 Oct 2012
1 answer
152 views
The following xaml give me an error (Could not load file or assembly 'Telerik.Windows.PersistenceFramework...) during runtime:
<UserControl x:Class="MainSail.EquipmentList.Views.EquipmentListNavigator"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:l="clr-namespace:MainSail.Common;assembly=MainSail.Common"
             xmlns:local="clr-namespace:MainSail.EquipmentList.Views"
             mc:Ignorable="d"
             FontSize="14"
             Height="500">
  <telerik:RadDockPanel>
    <Border Margin="10,5,10,10" Grid.Row="1" CornerRadius="4,4,4,4" BorderBrush="#193441" Background="#DDDCC5" BorderThickness="2,2,2,2">
      <!-- EQUIPMENT TREE -->
    <telerik:RadTreeListView Name="equipmentTreeView" Margin="8" Background="Beige"
                         telerik:PersistenceManager.StorageId="equipmentTreeView"
                         ItemsSource="{Binding FirstGeneration}"
                         telerik:StyleManager.Theme="Vista" 
                         IsDragDropEnabled="True"
                         SelectionMode="Single"
                         SelectionUnit="FullRow"
                         IsSynchronizedWithCurrentItem="False"
                         AutoGenerateColumns="False" >

Rob
Top achievements
Rank 1
 answered on 29 Oct 2012
0 answers
75 views

I am trying to write a C# program in wpf that retrieves the content of a web page.

The first thing I tried was to try the WebRequest and WebResponse classes.  This did not provide the actual displayed content.  WebResponse reveils the HTML code that is sent to the browser.  But I discovered that, while the page is being loaded by the browser, javascript can change what content is finally displayed in the browser.

So I decided to use the WebBrowser class.

Immediately I found that there are two WebBrowser classes.  Thee is the one that is documented for WinForms and there is another that is documented for WPF.  I need to understand the one documented for WPF.  What I think I neeed to know what to do is to retrieve code after the "LoadCompleted" method is caused.  But I do not know how to this and I cannot find any example demonstrating how this is done.

 

William
Top achievements
Rank 1
 asked on 28 Oct 2012
1 answer
84 views
Not sure what info to write, but wanted to get this thread started. I have a project with 2 UI developers. I run some of the testing and builds on my machine.

The UI guys can pull data for some grids and it displays just fine. No issues. I will get latest, compile and run the app. I see the data everywhere except for 3 particular grids. All grids are coded up the same way-same design pattern. Also, we use mvvm style.

The UI developers compiled and ran on 5 different machines (VMs, physcials win7 and win8) The data in the grid always appears.

I am running win7 on a VM. I have the same version of telerik controls installed.

any ideas?

thanks

version: 2012.2.725.40
Robert
Top achievements
Rank 1
 answered on 27 Oct 2012
2 answers
347 views
Hi,

I'm version 2012.3.1017.40 and trying to enabled the TrackBar Behavior on a double-click on the chart's data area and then disable it with another double click.  I keep getting an exception when I try to disable it.  I'm wondering if this is a bug with the control, or is it the way I'm trying to disable it?

Here is how I'm trying to Enable/Disable the TrackBall behavior:
 
private void radCartesianChart1_MouseDoubleClick(object sender, MouseButtonEventArgs e)
    {      
  
      int index = -1;
  
      for (int i = 0; i < radCartesianChart1.Behaviors.Count; i++)
      {
        if (radCartesianChart1.Behaviors[i] is ChartTrackBallBehavior)
        {
          index = i;
          break;
        }
      }
  
      var mousePosition = e.GetPosition(this);
      Telerik.Charting.DataTuple tuple = radCartesianChart1.ConvertPointToData(mousePosition);
  
      //make sure the double-click occurred in the chart data area
      if (Convert.ToSingle(tuple.FirstlValue) > 0 && Convert.ToSingle(tuple.SecondValue) > 0)
      {
        if (_ShowTrackBall == false)
        {
          //create the TrackBallBehavior and add
          if (index == -1)
          {
            ChartTrackBallBehavior tb = new ChartTrackBallBehavior();
            tb.ShowIntersectionPoints = true;
            tb.ShowTrackInfo = true;
            radCartesianChart1.Behaviors.Add(tb);
  
            _ShowTrackBall = true;
          }
        }
        else
        {
          if (index != -1)
          {
            ChartTrackBallBehavior tb = radCartesianChart1.Behaviors[index] as ChartTrackBallBehavior;
            radCartesianChart1.Behaviors.Remove(tb);
  
            _ShowTrackBall = false;
          }
        
      }  
    }

It throws an System.ArgumentNullException, {"Value cannot be null.\r\nParameter name: key"},  when I try to disable it with the following StackTrace:
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at Telerik.Windows.Controls.ChartView.ChartTrackBallBehavior.GetPresenterToDataPointInfos(List`1 dataPointInfos) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartTrackBallBehavior.Branch.cs:line 697
   at Telerik.Windows.Controls.ChartView.ChartTrackBallBehavior.FilterDataPointsByClosestCategoryPerAxis(List`1 dataPointInfos) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartTrackBallBehavior.Branch.cs:line 674
   at Telerik.Windows.Controls.ChartView.ChartTrackBallBehavior.UpdateDataContext(ChartDataContext context) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartTrackBallBehavior.Branch.cs:line 371
   at Telerik.Windows.Controls.ChartView.ChartTrackBallBehavior.UpdateVisuals() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartTrackBallBehavior.Branch.cs:line 345
   at Telerik.Windows.Controls.ChartView.ChartTrackBallBehavior.OnMouseMove() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartTrackBallBehavior.Branch.cs:line 570
   at Telerik.Windows.Controls.ChartView.ChartTrackBallBehavior.AdornerContainerMouseMove(Object sender, MouseEventArgs e) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartTrackBallBehavior.Branch.cs:line 588
   at System.Windows.Input.MouseEventArgs.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.RaiseTrustedEvent(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.MouseDevice.Synchronize()
   at System.Windows.Input.MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, Int32 timestamp)
   at System.Windows.Input.MouseDevice.Capture(IInputElement element, CaptureMode captureMode)
   at System.Windows.UIElement.CaptureMouse()
   at Telerik.Windows.Controls.ChartView.ChartPanAndZoomBehavior.AdornerContainerMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Behaviors\ChartPanAndZoomBehavior.Branch.cs:line 256
   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.OnMouseDownThunk(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.RaiseTrustedEvent(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, WindowMessage 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, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   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.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at delete_TelerikGridViewTest.App.Main() in C:\Users\dkepple\documents\visual studio 2010\Projects\delete_TelerikGridViewTest\delete_TelerikGridViewTest\obj\x86\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

dd

Thanks,
David
David
Top achievements
Rank 1
 answered on 26 Oct 2012
1 answer
143 views
Please find the sample project here

The sample application is divided into two parts:

The bottom part is similar to the RadListBox drag-n-drop demo with 4 elements:
  1. RadListBox bound to ObservableCollection<Country> CountryList
  2. RadListBox bound to ObservableCollection<Country> GroupA
  3. RadListBox bound to ObservableCollection<City> GroupD
  4. WPF ListBox bound to ObservableCollection<Country> GroupA, AllowDrop unset

The Drag-n-Drop behaviour is as expected, I can drag n drop between 1&2, but not to 3 or 4, it worked very well.

The top part is the identical setup, except it is contained within a RadTileView, and there are a few unexpected behaviours:

  1. Cursor no longer change to Cursors.No when drag over list 3 & 4
  2. When dropped on list 3, nothing happens, this is good. But when dropped on list 4 or anywhere on the tileview that's not a RadListBox, the item is removed from the drag source, and not added to anywhere.

So how do I fix these two issues?
Zarko
Telerik team
 answered on 26 Oct 2012
1 answer
96 views
Hi All,

I want create the RadGridView Control with Editable Rows. Once i Edit the GridView's last row then pressing enter should add the new row and focus should be in the First column. Can you guide me on this? Also if there is any sample please share with me...

Thansk and Regards,
Sakthi 
Dimitrina
Telerik team
 answered on 26 Oct 2012
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
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?