Telerik Forums
UI for WPF Forum
6 answers
403 views
Hi,

using your winforms controls I can change the style of the main window of my application relatively easily

How do I change the style of my main window to the Office_Black theme using WPF controls...

I can see how to set the default theme however this only seems to affect the controls within the window not the border of the window itself.

I have tried using the RadWindow but this only creates a sub window with the defined style, and does not set the main window style

many thansk
Jason
Top achievements
Rank 1
 answered on 29 Aug 2014
1 answer
126 views
Hi Guys,

A while back we were in contact with you regarding dragging shapes without they change position. TicketID: 662635.

We implemented the solution you guys suggested.

Now we have discovered a bug regarding the way we drag shapes.

The problem is because we set Handled = true in DragPreview, when dragged shape is dropped outside the diagram, the drag operation is never ended.

Issue here is we implemented a DragAdorner that follows the cursor, and when it re-enters the diagram the drag operation is still active. Even though the mouse button is not pressed. The issues also exists in the sample projects from the support ticket. (No dragTemple, but changed cursor)

Is there a way we can end the drag operation, when MouseLeftButtonUp occurs outside diagram.

/Anders
Martin Ivanov
Telerik team
 answered on 29 Aug 2014
3 answers
171 views
I have a DataGrid that is bound to a the Values in a ObservableDictionary (my own class) instead of the traditional ObservableCollection. Because of this, I cannot use the build in delete mechanism of the GridView.  I therefore need to implement my own custom delete behavior on the current selected row when the Delete button is pressed.

My problem is that I cannot get an event when the delete button is pressed.  Neither the Deleted, Deleting or KeyDown events for the DataGrid is firing.  The CanUserDeleteRows property is set to true.

How can I get an event to fire when the Delete key is pressed?

 

Dimitrina
Telerik team
 answered on 29 Aug 2014
1 answer
75 views
I bound a RadGridView to a VirtualQueryableCollectionView backed by SQL using System.Data.Linq.ITable.

At first Virtualization works nicely as I see that the LoadSize is submitted to the SQL provider (tracing SQL queries).
Once I add grouping (dragging a column into the grouping panel) all rows for each group are loaded. 

        <telerik:RadGridView x:Name="Table" ItemsSource="{Binding Data}" AutoGenerateColumns="False" IsReadOnly="True" 
                             Height="500" Width="500"
                             GroupRenderMode="Flat"
                             CanUserInsertRows="False" CanUserDeleteRows="False"
                             EnableRowVirtualization="True" EnableColumnVirtualization="True"
                             ScrollMode="Deferred"/>

Is UI virtualization supported in a group scenario? Am I missing some settings?
Dimitrina
Telerik team
 answered on 29 Aug 2014
2 answers
229 views
Hello

I need to draw a border over the RadRibbonWindow, excluding the TitleBar.

I've attached an image where on the left you can see what I'm actually doing and on the right what I want to achieve.

How can I achieve that?

Code:

<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <telerik:RadRibbonView ApplicationName="DocumentSelector">
            <telerik:RadRibbonTab Header="Documents" />
        </telerik:RadRibbonView>

        <Border Grid.Row="0"
                Grid.RowSpan="2">
            <Border.Background>
                <SolidColorBrush Opacity="0.5" Color="Red" />
            </Border.Background>
        </Border>
    </Grid>


Maurício
Top achievements
Rank 1
 answered on 29 Aug 2014
1 answer
136 views

When using the RadImageEditor for WPF, I would like to keep the image centered when I programatically set the ScaleFactor property to magnify the image.

I assume that would mean controlling the horizontal and vertical scrollbar positions from code.  

Is there a way to do that?
Todor
Telerik team
 answered on 29 Aug 2014
5 answers
475 views
I'm currently working on getting the ScheduleView to act like a nice Gantt chart for a project. In essence, what we require is a chart that displays A series of Gantt-lines for items to show reservations in a TimeLine view.

Currently, we're having issues getting the styling to work correctly and would like to know what styles to change to get the following to work:

* Kill the hours/minutes line. We want it gone entirely.
* Format date be two lines with weekdays as names below the date 
* Replace the resources with a custom view (we use MVVM of course) To have a lot more information display, including an image per item.
* Have the option for coloring each booking-entry according to an enum on the object (ie red for bookings, yellow for maintenances, green for unconfirmed bookings etc)

So far we've managed to edit the resources for the RadScheduleView to hide the timeLine button entirely when the title is null, but trying various suggestions and test-projects found on these forums for the rest has, so far, not helped with the other stuff. An example is the hours/minutes line that looks odd. I found a reply her telling me to set the TimeRulerItemStyleSelector to null and have an empty style to replace it (height + width set to 0, visibility collapsed) but, as the attached image shows, this didn't quite do the trick.

Any and all help is appreciated :)
Yana
Telerik team
 answered on 29 Aug 2014
1 answer
180 views
I develop automated tests using MS VS 2012 and CodedUI. Our application contains number of teleriks gridviews. For test purposes I need to obtain every row from those gridviews, but the problem is I can only obtain limited number of rows due to virtualization. Tried scrolling new rows into view to realize them and adding them to array/collection
code snippet:

// determine viewport, i.e. how many rows are accessible for that specific panel
             
            for (int m = 0; m < 50; m++)
            {
                try
                {
                    if (!hGridView.GetRow(m).Exists)
                    {
                    }
                }
                catch (UITestControlNotFoundException)
                {
                    viewPort = m - 1;
                    break;
                }
            }
 
            // no extra scrolling required, all rows are accessible
            if (rowCount <= viewPort + 1)
            {
                for (int m = 0; m < rowCount; m++)
                {
                    rows_output[m] = hGridView.GetRow(m);
                }
                return rows_output;
            }
 
            //get all accessible rows before scrolling to expose the rest
            for (int m = 0; m <= viewPort; m++)
                {  
                    rows_output[m] = hGridView.GetRow(m);
                    col1.Add(hGridView.GetRow(m));
                }
 
            for (int m = 0; m < viewPort; m++) { Keyboard.SendKeys("{DOWN}"); }
             
            for (int i = 0; i <= rowCount - viewPort - 2; i++)
            {
                 
                try
                {
                    // check the row to add isn't a duplicate
                    if (!col1.Contains(hGridView.GetRow(viewPort)))
                    {
                        col1.Add(hGridView.GetRow(viewPort));
                    }
 
                    rows_output[i + viewPort + 1] = hGridView.GetRow(viewPort);
                }
                catch (UITestControlNotFoundException)
                {
                    // if for some reason gridview becomes inaccessible
                    break;
                }
 
                //scroll the grid down a bit
                Keyboard.SendKeys("{DOWN}");
 
            }
code works ok when i'm debugging, but when i'm just running the test resulting array is mess, the same ~10 rows repeats again and again
What's wrong with this code? Is there any other reliable way to get all the data from virtualized grid?
Dimitrina
Telerik team
 answered on 29 Aug 2014
1 answer
179 views
Is Telerik (UI for WPF) has a set of icons ready to use? I know that some of Telerik WPF themes have very small set of icons but I mean something big like in mahapps metro (http://mahapps.com/guides/icons-and-resources.html). It doesn't have to be Canvas icons it could be pictures icons(png, jpg).
Yana
Telerik team
 answered on 29 Aug 2014
2 answers
143 views
I'm using WPF Telerik Controls Q2 2014. When I use RadDatePicker, it also allows to select time (which is not the expected behaviour). Tried setting InputMode="DatePicker", still didn't help. Also, the selected date is not displayed properly as the watermark is visible everytime. Am I missing anything ?

My code is:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"    

<telerik:RadDatePicker Grid.Row="0" Grid.Column="1"                                                                              
                                          Width="120" InputMode="DatePicker"
                                          HorizontalAlignment="Left" VerticalAlignment="Top" 
                                          Margin="10,10,5,5"></telerik:RadDatePicker>


Please see the attached screenshot.
Josh
Top achievements
Rank 1
 answered on 29 Aug 2014
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?