Telerik Forums
UI for WPF Forum
1 answer
294 views

I had read this: https://docs.telerik.com/devtools/wpf/getting-started/installation/installation-installing-from-nuget-wpf

I prefered to install NuGet package rather than install a big setup(TelerikUIForWpfSetup.exe).

So could I only install NuGet package to use the full features of UI for WPF?

Nikola
Telerik team
 answered on 30 Jul 2020
1 answer
127 views
Is it possible, and if yes how, to make IDataErrorInfo validation not mandatory? 

My issue is that user cannot leave the cell when data in it is not valid. I would like to have all the suff like border, outline etc but to be able to leave the cell or the row.
Martin Ivanov
Telerik team
 answered on 30 Jul 2020
3 answers
122 views

Hello,

 

I was wandering if it was possible to change the style of an appointment that starts on one day and ends the next day in a Month View. For exemple, a shift that begins at 22pm and ends at 6am. When I try to do it it just streches the appointment across both days, but I don't want that is there a way to change this?

 

There's a picture of what I would want to see.

 

Thanks

Vladimir Stoyanov
Telerik team
 answered on 30 Jul 2020
2 answers
321 views
Hi,

I'm having some trouble using RadControls_for_WPF_2009_2_0813_TRIAL. I have used in a project RadWindow for WPF. "Sometimes" when I close a window the InvalidOperationException is thrown. I'm hoping to find help here, because for the moment I'm using the trial version of the controls, trying to demonstrate that this is a fine acquisition. Here is part of my stack trace:

Startup URI: ....xbap
Application Identity: file:///....xbap

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max(IEnumerable`1 source)
   at Telerik.Windows.Controls.RadWindowPopup.WindowPopupAdornerFactory.WindowPopupAdornerImpl.BringToFront()
   at Telerik.Windows.Controls.RadWindowManager.BringToFront(RadWindow window)
   at Telerik.Windows.Controls.RadWindow.<BringToFront>b__3()
   --- End of inner exception stack trace ---
   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.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.StartDispatcherInBrowser(Object unused)
   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)

-----------------------

Thanks !!
Mehrdad
Top achievements
Rank 1
 answered on 29 Jul 2020
3 answers
437 views

I have a RedGridView with one of the columns editable. When the user enters a new value in a cell of that column and then hits enter, the

next row gets focused. I dont want that to happen. I just want the cell to lose its focus.

 

Dilyan Traykov
Telerik team
 answered on 29 Jul 2020
5 answers
1.4K+ views

Hi,

I have the following problem.
On my map I have a visualization layer with an item template.
If I load the data synchronously, there is no problem. But if I changed zu async load, then I get the "Must create DependencySource on same Thread as the DependencyObject" Exception.

            <telerik:RadMap x:Name="OverviewMap"
                            Grid.Column="1"
                            Center="{Binding Center, Mode=TwoWay}"
                            MouseLocationIndicatorVisibility="Hidden"
                            ZoomLevel="{Binding ZoomLevel, Mode=TwoWay}">

                <telerik:VisualizationLayer ItemsSource="{Binding Jobs}"
                                            SelectionChanged="VisualizationLayer_OnSelectionChanged"
                                            UseBitmapCache="False">
                    <telerik:VisualizationLayer.ItemTemplate>
                        <DataTemplate>
                            <Grid HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  telerik:MapLayer.BaseZoomLevel="10"
                                  telerik:MapLayer.Location="{Binding Location}">
                                <Path Data="{Binding PathData, Mode=OneWay}"
                                      Fill="LightSlateGray"
                                      Stretch="Uniform"
                                      Stroke="{Binding StrokeColor, Mode=OneWay}">

                                    <ToolTipService.ToolTip>
                                        <StackPanel Orientation="Vertical">
                                            <TextBlock FontWeight="Bold" Text="{Binding CustomerName, Mode=OneWay}" />
                                            <TextBlock>
                                                <Run Text="{Binding UnitNumber, Mode=OneWay}" />
                                                <Run Text=" - " />
                                                <Run Text="{Binding UnitType, Mode=OneWay}" />
                                            </TextBlock>
                                            <TextBlock Text="{Binding Information, Mode=OneWay}" />
                                            <Border BorderBrush="Black" BorderThickness="1" />
                                            <TextBlock Text="{Binding PositionInformation, Mode=OneWay}" />
                                        </StackPanel>
                                    </ToolTipService.ToolTip>
                                </Path>
                            </Grid>
                        </DataTemplate>
                    </telerik:VisualizationLayer.ItemTemplate>
                </telerik:VisualizationLayer>

                <telerik:VisualizationLayer ItemsSource="{Binding Technicians, Mode=OneWay}"
                                            SelectionChanged="VisualizationLayer_OnSelectionChanged"
                                            UseBitmapCache="False">
                    <telerik:VisualizationLayer.ItemTemplate>
                        <DataTemplate>
                            <Grid HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  telerik:MapLayer.BaseZoomLevel="10"
                                  telerik:MapLayer.Location="{Binding Location, Mode=OneWay}">
                                <StackPanel HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Orientation="Vertical">
                                    <Path HorizontalAlignment="Center"
Data="M19.359996,22.671184C19.660996,22.671184,19.961996,22.771184,20.262996,22.771184L18.857996,24.476198C18.557996,24.878201 18.757996,25.580207 19.259996,25.98121 19.760996,26.382214 20.462996,26.483214 20.864995,26.082211L22.168995,24.476198C22.368996,24.878201 22.469996,25.279205 22.469996,25.680208 22.469996,27.386222 21.064996,28.690232 19.459996,28.690232 19.158996,28.690232 18.857996,28.589231 18.557996,28.489231L15.948997,31.699257C15.647996,32.10026 15.046997,32.10026 14.544997,31.699257 14.042997,31.298254 13.942997,30.696249 14.243997,30.295245L16.851997,27.085219C16.550996,26.583215 16.350996,26.082211 16.350996,25.480206 16.350996,23.975194 17.754997,22.671184 19.359996,22.671184z M6.9209985,18.759152C8.6269982,20.063162 10.632998,20.765168 12.939997,20.765168 15.146997,20.765168 17.252997,20.063162 18.958996,18.759152 22.870995,19.260156 25.879996,22.571183 25.879996,26.683216L25.879996,30.094244 18.456996,30.094244 18.857996,29.693241 19.359996,29.693241C21.566996,29.693241 23.372996,27.887226 23.372996,25.680208 23.372996,25.078203 23.271996,24.577199 23.071995,24.075195L22.268996,22.972186 21.767996,22.671184 20.563996,21.868177C20.162996,21.768176 19.760996,21.668175 19.359996,21.668175 17.152997,21.668175 15.346997,23.47319 15.346997,25.680208 15.346997,26.182212 15.447997,26.683216 15.647996,27.18522L13.441997,29.893242C13.340997,29.994243,13.340997,30.094244,13.240997,30.094244L13.240997,30.194244 0,30.194244 0,26.784217C0,22.671184,3.0089991,19.260156,6.9209985,18.759152z M5.8179989,9.4290762L10.933998,9.4290762 12.036997,9.4290762 14.243997,9.4290762 15.346997,9.4290762 20.061996,9.4290762 20.061996,9.530077C20.162996,9.9310799 20.162996,10.332084 20.162996,10.834087 20.162996,14.84612 16.952997,18.056146 12.939997,18.056146 8.9269981,18.056146 5.7169987,14.84612 5.7169986,10.834087 5.7169987,10.332084 5.7169987,9.9310799 5.8179989,9.4290762z M16.350996,0.80200577C18.757996,2.0060158 20.362996,4.5140362 20.362996,7.4230595 20.362996,7.8240623 20.362996,8.2260666 20.262996,8.5270691L15.046997,8.5270691C14.845997,6.520052,14.845997,1.6050129,16.350996,0.80200577z M9.7299981,0.70200539C11.535997,1.1030083,11.434998,6.4200516,11.334998,8.6270695L5.6169986,8.6270695C5.5169987,8.2260666 5.5169987,7.8240623 5.5169987,7.4230595 5.5169987,4.5140362 7.2219985,1.9060154 9.7299981,0.70200539z M12.939997,0C13.942997,0 14.945997,0.20100212 15.748997,0.602005 14.042997,2.1070175 14.343997,7.4230595 14.444997,8.6270695L11.836998,8.6270695C11.936997,7.4230595 12.237998,1.806015 10.331998,0.50200462 11.234998,0.20100212 12.036997,0 12.939997,0z"
                                          Fill="{Binding Background, Mode=OneWay}"
                                          Stretch="None"
                                          Stroke="Blue">

                                        <ToolTipService.ToolTip>
                                            <ToolTip Content="{Binding Name, Mode=OneWay}" />
                                        </ToolTipService.ToolTip>
                                    </Path>
                                    <TextBlock HorizontalAlignment="Center"
                                               Foreground="Blue"
                                               Text="{Binding Name, Mode=OneWay}"
                                               TextAlignment="Center" />
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </telerik:VisualizationLayer.ItemTemplate>
                </telerik:VisualizationLayer>
            </telerik:RadMap>

 

The problem is the first Layer with the items source binding to "Jobs".
I think the Path data causes the exception.

How can I load the data asyc?

Thank you
Best regards

Markus

Dilyan Traykov
Telerik team
 answered on 29 Jul 2020
5 answers
144 views

Hi,

We recently updated to the latest release 2020.2.617 and we now have an issue that was not present in 2018.3.911.

Our GridView is bound to a list of objects inheriting from DynamicObject. If the user sorts the list using the mouse and then presses our refresh button the sorting disappears. Our refresh button just binds a completely new list containing the exact same data as before.

In 2018.3.911 the sorting is retained after a refresh.

Any assistance would be greatly appreciated.

Regards
Anthony

Dilyan Traykov
Telerik team
 answered on 29 Jul 2020
4 answers
152 views
Hello, 

In debug mode, the RadGridView within the application gets it's information from a SQLCE Database just fine. But once I set it to release mode, The itemsource does have items inside, but the RadGridView shows nothing.

public partial class MainWindow : Window
{
 
    public MainWindow()
    {
        InitializeComponent();
        //radGridView1.ItemsSource = getData();
        radGridView1.IsFilteringAllowed = true;
    }
 
    public DataTable getData()
    {
        // Creating a datatable to bind to the radgrid
        DataTable tableItem = new DataTable();
 
 
        //Readonly Fields, not for inlinje editing
        DataColumn code = new DataColumn("Code", typeof(string));
        code.ReadOnly = true;
        DataColumn product = new DataColumn("Product", typeof(string));
        product.ReadOnly = true;
 
 
        // Adding fields
        tableItem.Columns.Add(new DataColumn("Username", typeof(string)));
        tableItem.Columns.Add(product);
        tableItem.Columns.Add(new DataColumn("Company", typeof(string)));
        tableItem.Columns.Add(new DataColumn("Model", typeof(string)));
        tableItem.Columns.Add(new DataColumn("Serial", typeof(string)));
        tableItem.Columns.Add(new DataColumn("Status", typeof(string)));
        tableItem.Columns.Add(new DataColumn("Date", typeof(string)));
        tableItem.Columns.Add(code);
 
        // Connection string for the local Database, and grab all the data from it to store into the grid
        string conString = Properties.Settings.Default.ExternalInventoryDBConnectionString;
        string queryString = "Select * from externalInventory";
 
        using (SqlCeConnection con = new SqlCeConnection(conString))
        {
            try
            {
                con.Open();
                SqlCeCommand cmd = new SqlCeCommand(queryString, con);
                // create data adapter
 
                SqlCeDataAdapter da = new SqlCeDataAdapter(cmd);
                da.Fill(tableItem);
            }
            finally
            {
                con.Close();
            }
        }
        return tableItem;
    }
}

Thank you for reading my problem,
Joe Nguyen
Dilyan Traykov
Telerik team
 answered on 29 Jul 2020
5 answers
96 views
Basically, a RadTreeViewItem goes to edit mode, then I click on any other button, label, textbox (outside the tree of course) and the edit mode is not cancelled. Is there a property to allow this or an alternative solution? Let me know.

Here's a video to illustrate my point:


Thanks!
Vladimir Stoyanov
Telerik team
 answered on 29 Jul 2020
3 answers
422 views

Good day.

I am using a WatermarkTextBox inside a Grid. The WatermarkTextBox width depends on the Grid's width. I am using HorizontalAlignment="Stretch"

What is happening is when i input long text in my WatermarkTextBox, the textbox is growing. I don't want this to happen. 

I can't set a fixed width for the WatermarkTextBox since I need it to adjust based on the Grid's width. I just want the textbox Not to grow when I input long text.

How can I achieve this?

Thank you.

gerardo
Top achievements
Rank 1
Veteran
 answered on 29 Jul 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?