Telerik Forums
UI for WPF Forum
1 answer
122 views
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:Telerik_Windows_Controls_Primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls.Navigation"
                    >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml"/>
  
    </ResourceDictionary.MergedDictionaries>
    <Style TargetType="{x:Type telerik:RadPaneGroup}" x:Key="StandardPaneGroup">
  
        <Setter Property="Background" Value="#1C1C1C"></Setter>
        <Setter Property="BorderBrush" Value="#1C97EA"/>
          
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:PaneHeader}">
                    <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="true" Height="23">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="25"/>
                        </Grid.ColumnDefinitions>
                          
                    </Grid>
                </ControlTemplate>
                     
            </Setter.Value
        </Setter>
          
    </Style>
</ResourceDictionary>

I am creating an application where it can have the docking functionality. SO I choosed telerik controls for it as it makes my work simple.

I am facing the issues while setting the styles for Header in the RadPane. I am createing RadPane's dynamically through a click event of a  menu Item.  I want to set a style for RadPane header,border of my own  where I Can use it all over  my application.  I am confused either to write styles for RadPane or RadPane group or PaneHeader.

Attached file is the sample of my application created using the general WPF controls like Menu, Tabcontrol. Created styles

Masha
Telerik team
 answered on 16 May 2013
6 answers
259 views
Hello Telerik,

I need to change column type of cell from GridViewDynamicHyperlinkColumn to GridViewDataColumn from code behind or data trigger which depend on DataMemberBinding="{Binding status}"  that return "Yes" or "No"

eg. 
GridView1.ItemSource 
fileName = "xxx" , status = "Yes" 
fileName = "aaa" , status = "No"
expected result
      Column 0          Column 1
Row 0 :       xxx        :        Yes        
Row 1 :       aaa         :        No           

[row0,col1 (Yes)] should be DynamicHyperlinkColumn to open a file like XAML below
[row1,col1 (No)] should be DataColumn

XAML
<telerik:RadGridView x:Name="GridView1" AutoGenerateColumns="False">
    <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding fileName}" Header="Filename" />
    <telerik:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding status}"
     Header="Upload Status"      NavigateUrlMemberPaths="status"
     NavigateUrlFormatString="{} file:///C:/{0}.xls" TargetName="_blank" />
   </telerik:RadGridView.Columns>
</telerik:RadGridView>

Please give me some advice.

Regards,

SweNz

Dimitrina
Telerik team
 answered on 16 May 2013
0 answers
320 views

Hello Team,

I have a RadGridView with checkbox column  and also have another checkbox on header for selecting all checkbox. One user select header checkbox all the checkboxes in the rows should be selected. Here is my code

for (int j = 0; j <= ChecklistOfEditLoadItems.Count; j++)
                        {
                            GridViewRow row =
                                this.editload.ItemContainerGenerator.ContainerFromItem(ChecklistOfEditLoadItems[j]) as GridViewRow;
                            if (row != null)
                            {
                                TruckInventorySolution s = row.Item as TruckInventorySolution;
                                CheckBox ab = row.FindChildByType<CheckBox>();
                                if (row.IsEnabled == false || s.IsCommitted == true)
                                {
                                    ab.IsChecked = false;
                                }
                                else
                                {
                                    ab.IsChecked = true;
                                }
                            }
                        }

but this process is very very slow.. Please help to solve this problem.


Thanks,
Sravanthi
Sravanthi
Top achievements
Rank 1
 asked on 16 May 2013
3 answers
137 views
Do you know of  a way to disable a gallery and/or single nodes (GraphNode / NodeViewModelBase) - so it will be "grayed" and can't be dragged.

I wan't to disable some objects in that palette when certain condition apply to the diagram (max nodes count)

Thanks,
Guy
Petar Mladenov
Telerik team
 answered on 16 May 2013
7 answers
577 views

Hi,

we use Telerik V2012.1.326.35 with VS2008 and we have a strange problem :(

Actually in our solution, in one of our project we added a RadPdfViewer in a XAML file. In code behind, on a RadButton click event, we call the following method :

private void loadDoc()
{
    PdfDocumentSource newDoc = new PdfDocumentSource(new Uri(@"c:\MyDir\pdf2.pdf"));
    PdfDoc.DocumentSource = newDoc;

}

I don't know why but I always received the follwing error message (see attached file).

If I move our method in a brand new solution and project, it work!!! I checked all Telerik files and they are the same in both projects.

Any thought???
Thank's

Matthew
Top achievements
Rank 1
 answered on 16 May 2013
2 answers
196 views
I am using RadDiagram for my collection of shapes, but need to know how to customize it:
  • Allow selection/resizing (and show the selection & resize handles), but don't display any connectors or allow user to connect one shape to another
  • Change the units displayed during resizing to be something other than pixels (I want inches)
  • Show bounding box around shape when I select it. I have a simple line shape and it is very hard to get the resize controls to show up. I wished it just showed a bounding box selection when I selected it.

I am willing to do these things in XAML, code-behind or combination of both.

Thanks,
 Alan
Alan
Top achievements
Rank 1
 answered on 15 May 2013
2 answers
356 views
While the RadNumericUpDown control still has the focus from a previous edit,
if I update what it is bound to in code behind and RaisePropertyChanged for the property,
the RadNumericUpDown does not get updated.

If I first take the focus off of RadNumericUpDown on to another control before changing the bound value in the same way
as above the same RadNumericUpDown does get updated.

Some questions:
  * Is this behavour expected?
  * How can I disable/workaround this?

Below is how I am defining the control and binding in XAML:
<controls:RadNumericUpDown x:Name="XTextBox" Value="{Binding GraphicalItem.Rect.X}" UpdateValueEvent="PropertyChanged" Minimum="{Binding GraphicalItem.Rect.MinX}" Maximum="{Binding GraphicalItem.Rect.MaxX}" LargeChange="{Binding LargeCoordinateChange}" SmallChange="{Binding SmallCoordinateChange}" BorderBrush="#FFCBCBCB" Margin="3,2,0,2" HorizontalAlignment="Right" BorderThickness="1" Background="{x:Null}" Height="20" MinWidth="40" Padding="1,1,2,1"/>


Alan

Alan
Top achievements
Rank 1
 answered on 15 May 2013
2 answers
59 views
I just noticed that even on a RadDiagram with no Shapes there appears to be very small black spot.
This is most visible when you set the Background of the RadDiagram to White and turn off the grid visibility.
You may need to zoom quite a way into the diagram to see this.  If you do, it appears as a Black Circle.

Here is how I am creating my empty RadDiagram in code behind:
   backgroundColor is Colors.White
   isEditingEnabled is false
private RadDiagram CreateDiagram(Color backgroundColor, bool isEditingEnabled)
{
    var diagram = new RadDiagram
    {
        IsBackgroundSurfaceVisible = false,
        Background = new SolidColorBrush(backgroundColor),
        IsPanEnabled = false,
        IsZoomEnabled = false,
        AllowCopy = false,
        AllowCut = false,
        AllowDelete = false,
        AllowDrop = false,
        ActiveTool = MouseTool.PointerTool,
        AllowPaste = false,
        IsDraggingEnabled = isEditingEnabled,
        IsResizingEnabled = isEditingEnabled,
        IsRotationEnabled = false,
        IsConnectorsManipulationEnabled = isEditingEnabled,
        IsManipulationAdornerVisible = isEditingEnabled,
        IsManipulationEnabled = isEditingEnabled,
        SelectionMode = isEditingEnabled ? SelectionMode.Single : SelectionMode.None,
        IsSnapToGridEnabled = false,
        IsSnapToItemsEnabled = false,
    };
    diagram.Clear();
    DiagramAnimations.SetIsZoomAnimationEnabled(diagram, false);
    ScrollViewer.SetHorizontalScrollBarVisibility(diagram, ScrollBarVisibility.Hidden);
    ScrollViewer.SetVerticalScrollBarVisibility(diagram, ScrollBarVisibility.Hidden);
 
    return diagram;
}


Alan
Top achievements
Rank 1
 answered on 15 May 2013
1 answer
104 views
Hello,

I would like to load data into the back stage only if the user chooses to open the back stage and so would ideally subscribe to an open event but I cannot see one. Is this true? If so, how is the best way to achieve this.

Thanks.
Kiril Vandov
Telerik team
 answered on 15 May 2013
4 answers
163 views
I have a collection of RadDiagram items I need to print out on a single page.
I also need to preview it in a View.
I have placed my RadDiagram items in cells in a Grid for each page and I want to print.
Everything works great when viewing this in a XAML view.

For printing, I take the collection of Grids (pages) and create a FixedPage for each Grid (page) and a FixedDocument to contain all
the pages.
I then use PrintDialog's PrintDocument() method.
I can't use Telerik's Printing utilities as they support only one RadDiagram and no layout.

If the size (Width & Height) of my RadDiagram is less than or equal to the size of the Grid cell,
I get an extra Scroll bar on the right and bottom sides of each RadDiagram on the page.
As I'm not embedding the RadDiagram inside of a ScrollViewer and I don't see these scroll bars when I view it on the screen,
I don't know where this is coming from.

To prove it is RadDiagram causing this, I have substituted a simple Rectangle control in place of the RadDiagram and the 
scroll bars go away.  I have also tried an empty RadDiagram and I also get the scroll bars.

I have attached a picture of one RadDiagram in a Grid being viewed and the same Grid being printed to show the scroll bars.

My questions are:
  * Why am I getting the scroll bars?
  * How do I turn them off?

Thanks,
 Alan
Hristo
Telerik team
 answered on 15 May 2013
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?