Telerik Forums
UI for WPF Forum
3 answers
219 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
396 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
235 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
75 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
642 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
158 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
256 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
245 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
5 answers
200 views
Steps to reproduce:

1) Subclass RadSlider as pasted in the code below, and put that control in a window as illustrated below.
2) Set a trace point in "OnSelectionRangeChanged" and output newValue.SelectionStart
3) Once the app is loaded expand the range selection so you can click and drag the selection
4) Click and drag the selection from right to left and observer SelectionStart, the value is not consistently 0.0 when you drag the selection to the beginning of the range unless you change the range itself (expand it). 

Code:

Subclassed RadSlider

public class JSlider : RadSlider
    {
        public JSlider()
        {
            IsSelectionRangeEnabled = true;
        }
 
        /// <summary>
        /// Raises the <see cref="E:System.Windows.FrameworkElement.SizeChanged"/> event, using the specified information as part of the eventual event data.
        /// </summary>
        /// <param name="sizeInfo">Details of the old and new size involved in the change.</param>
        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);
 
            // setup the slider with the correct maximum based on our current available width
            Minimum = 0;
            Maximum = ActualWidth;
        }
 
 
        protected override void OnSelectionRangeChanged(SelectionRangeChangedEventArgs oldValue, SelectionRangeChangedEventArgs newValue)
        {
            base.OnSelectionRangeChanged(oldValue, newValue);
 
 
        }
    }

XAML

<Grid>
        <DockPanel>
            <WpfApplication15:JSlider DockPanel.Dock="Bottom" Height="200"/>
        </DockPanel>
    </Grid>
Petar Mladenov
Telerik team
 answered on 07 Jun 2011
8 answers
274 views
I'm evaluating RadDocking control.

I'm trying to persist layout data in userprofle and then reloading the layout.
When I'm reloading layout I'm observing that "name" or "tag"  or even other internal property for properly identification
at loading time doesn't serialize properly (They have empty value). I need an id property to be serialized to be able to restore the layout properly at deserialize (matching panel content hosting of dockingPanel layout with the proper UIElemets)
Sample code:
//Saving:
using (MemoryStream stream = new MemoryStream())
            {
                foreach (RadPane pane in dockPanelMgr.Panes)
                {
                    //I'm trying set-up Tag property for serialization if
                    pane.Tag = pane.Name;
                }
                dockPanelMgr.SaveLayout(stream);

ServiceProvider.Get<Settings>()
                    .Layout.LayoutSerialization =
                    UTF8Encoding.UTF8.GetString(stream.GetBuffer());
}

ServiceProvider.Get<Settings>().Save();

//Loading:

string layout = ServiceProvider.Get<Settings>().Layout.LayoutSerialization;

                using (MemoryStream ms = new MemoryStream(UTF8Encoding.UTF8.GetBytes(layout)))
                {
                                           dockPanelMgr.LoadLayout(ms);
}
Miroslav Nedyalkov
Telerik team
 answered on 07 Jun 2011
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?