Telerik Forums
UI for WPF Forum
1 answer
169 views
Hi..
I when I create a PushPin.. it's the Red pushpin.  Are there any other built in 'Pins'?
How can I create a Blue, Yellow colored PushPin?
thanks again
Andrey
Telerik team
 answered on 08 Jun 2011
1 answer
424 views
Is there anyway I can get a defined resource from a theme?

I'd like to set the background color of my stackPanel to the same color as the header background of the tab control, or the background of the docking control. But I'm not sure where these resources are defined so I can use them. I'd prefer to use the defined resource rather than digging into the theme xaml and using the same hard-coded value. Because I'd like to be able to change the theme in the future without having to change all these hard-coded values.
Dimitrina
Telerik team
 answered on 08 Jun 2011
3 answers
199 views

I am converting a WPF app using standard MS controls to Telerik controls, I have an expander that contains a user control, with the Telerik expander, when expanded the user control is never shown, yet with the standard MS expander it does. Here is an example of both

 

<

 

Expander Name="FirmBenefits" Header="Benefit Details" IsExpanded="False" FontWeight="Bold" Margin="3,0,3,0">

 

 

 

    <detailViews:FirmDetailsBenefitsView/>    <!--  this works and the user control is displayed-->

 

</

 

Expander>

 

 

 

 

 

 

 

 

<telerik:RadExpander Header="Benefit Details" Margin="3" VerticalAlignment="Top" HorizontalAlignment="Stretch" >

 

 

 

    <telerik:RadExpander.Content>

 

 

 

        <detailViews:FirmDetailsBenefitsView/>    <!--  this DOESN'T work and the user control is NOT displayed-->

 

 

 

    </telerik:RadExpander.Content>

 

</

 

telerik:RadExpander>

Suggestions ?

 

Tina Stancheva
Telerik team
 answered on 08 Jun 2011
10 answers
361 views
Hi

Forgive me if I'm asking something stupid. I'm fairly new to WPF.

I'm trying to implement the demo inside an application I'm creating, but it's not synchronizing.

Here's more or less what I have (because I tried isolating the code).

<Window x:Class="AluminiumSystem.Dialogs.TestWindow"
        Title="TestWindow" Height="500" Width="500" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <telerik:RadDataForm Name="radColourForm" Grid.Row="0"  ItemsSource="{Binding Users}"/>
        <telerik:RadGridView Name="radColourGrid" Grid.Row="1" ItemsSource="{Binding Users}"  CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" />
    </Grid>
</Window>
public partial class TestWindow : Window
{
    public TestWindow()
    {
        InitializeComponent();
 
        DataContext = new Entities();
    }
}


Edit: Content is synced (if I edit in form, it's immediately shown in grid) but selection isn't. 
Edit2: Also, add & delete are disabled.

Thanks in advance,
Daryl
Vlad
Telerik team
 answered on 08 Jun 2011
3 answers
200 views

Hello  the filters doesn’t appears when I bind a TreeListView to a specific model, the approach of the model is similar as this:

public class A
    {
        private static readonly ObservableCollection<A> _children = new ObservableCollection<A>();

        public static ObservableCollection<A> Children
        {
            get { return _children; }
        }
    }

public class B : A
    {
        public string Name { get; set; }

        public string Type { get; set; }

        public virtual void LoadChildren()
        {
            // add some A items
            for (int i = 0; i < 10; i++)
            {
                Children.Add(new B{Name = i.ToString(),Type = "string"});
            }
        }
    }

 public class C : B
    {
        public override void LoadChildren()
        {
            // add some C items
            for (int i = 0; i < 10; i++)
            {
                Children.Add(new C { Name = i.ToString(), Type = "string" });
            }
        }
    }

MainWindow.xaml:

<telerik:RadTreeListView x:Name="tv">
                                <telerik:RadTreeListView.ChildTableDefinitions>
                                    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
                                </telerik:RadTreeListView.ChildTableDefinitions>

                                <telerik:RadTreeListView.Columns>
                                    <telerik:GridViewDataColumn Width="*" 
                                                            DataMemberBinding="{Binding Name}"
                                                            Header="Name"/>

                                    <telerik:GridViewDataColumn Width="Auto" 
                                                            MinWidth="150"
                                                            DataMemberBinding="{Binding Type}"
                                                            Header="Type"
                                                            HeaderTextAlignment="Center" />

                                </telerik:RadTreeListView.Columns>
                            </telerik:RadTreeListView>

Mainwindow.cs

  private void Window_Loaded(object sender, RoutedEventArgs e)

 {

            var b = new B();

            b.LoadChildren();

            var c = new C();

            c.LoadChildren();

          

            tv.ItemsSource = A.Children;

}

Thanks in advance.

Julian
Top achievements
Rank 1
 answered on 08 Jun 2011
2 answers
65 views
I have a DataFilter in tandem with a GridView to display data; one of the columns is ItemID (which is a long).  I want to filter on ItemID so I only see one value (say, 6917529027641130357  which I see as the first row); I use the DataFilter control and request ItemID is equal to 6917529027641130357 and all of the data is removed from the DataGrid.  In general, when I try to filter on any column which is a long, it doesn't find any data even though I know those IDs exist in the DataGrid; when I filter on any other columns, it appears to work just fine.  
When I investigated the filters that the DataFilter was using, I see that there is one listed filter in FilterDescriptors and it is "ItemID IsEqualTo 6.91752902764113E+18"  which is clearly wrong: it has converted the ItemID to a float which is not the same value as the long I input.  If I manually change that value so the filter is  "ItemID IsEqualTo 6917529027641130357 ", I see the appropriate results show up in the DataGrid.  Is there a setting to make the DataFilter handle my input properly?  or is this a bug?

Thanks for your help!
jacob
Top achievements
Rank 1
 answered on 07 Jun 2011
5 answers
609 views
I try to do the following, but run into issues:
- Load Docx works fine
- Find string company is not found
- Insert text with style stops the program

// Load Docx
RadDocument document = null;
IDocumentFormatProvider providerDocx = new DocxFormatProvider();
using (FileStream stream = File.Open(@"C:\Test.docx", FileMode.Open))
{
document = providerDocx.Import(stream);
}

// Change Document
document.Selection.Clear();
DocumentTextSearch search = new DocumentTextSearch(document);
foreach (var textRange in search.FindAll("Company"))
{
document.Selection.AddSelectionStart(textRange.StartPosition);
//document.Selection.AddSelectionEnd(textRange.EndPosition); // Necessary?
}
StyleDefinition style= new StyleDefinition();
document.Insert("My Business", style);  // Company should be changed to My Business

// Save Pdf

PdfFormatProvider providerPdf = new PdfFormatProvider();
using (Stream output = File.Open(@"C:\Test.pdf", FileMode.Create))
{
providerPdf.Export(document, output);
}

Any comments?
Thankx, Harry


Iva Toteva
Telerik team
 answered on 07 Jun 2011
2 answers
133 views
I have found the example where you can add the RadColorSelector to the DropDownContent of the RadRibbonDropDownButton. I would like to be able to display the selected colour in the DropDownButton.

Is this possible?
Zarko
Telerik team
 answered on 07 Jun 2011
2 answers
197 views
Hello Telerik Team,

I am using RadContextMenu inside RadDropDown , here is the code sinnipet ,
<Controls1:RadDropDownButton Name="Report" Content="Report" Margin="5,0,0,0" >
                 <Controls1:RadDropDownButton.DropDownContent >
                     <Controls2:RadContextMenu Name="ReportMenu" StaysOpen="False" ItemsSource="{Binding ReportList}" KeyboardNavigation.IsTabStop="True" />
                </Controls1:RadDropDownButton.DropDownContent>
             </Controls1:RadDropDownButton>

When navigating through keyboard , using "Tab" key once reached to Report DropDownButton , after that when pressing Down Arrow key able to see the menuitems added . But not able to select the menuitems.

What neededs to do to allow MenuItems to ve selected with keybaord.
Petar Mladenov
Telerik team
 answered on 07 Jun 2011
7 answers
215 views
Hi,

I am using VS 2010,Blend 4, Rad gridview version:2011.1.516.40, I have a rad gridview with multiple checkboxes and the header of the check box coloumn is toggle button, toggle button does select all check box and unselect all check box.  My question is i want to save the tube type and corresponding check items with the header toggle button content name:

ex: sample tube 2  , Is Checked =true, header name = Standard-4
sample tube 3  , Is Checked =true, header name = Standard-1

Bascially i want to save for the given sample what are the header names selected. How can i do it using RAD Grid view

FYI please see the attached image to have a better idea.

Thanks
Sarag.
Maya
Telerik team
 answered on 07 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?