Telerik Forums
UI for WPF Forum
2 answers
194 views
I want to use RadPanelBar with CM (use MEF as DI container). Every RadPanelBarItem should has something that is determined by other modules.

For examples, the following is my code structure:

MyProject.NavigationPane
       NavigationPaneView.xaml
       NavigationPaneViewModule.cs

MyProject.NavigationItem.Example1
       Example1View.xaml            (maybe any content)
       Example1ViewModel.cs

MyProject.NavigationItem.Example2
       Example2View.xaml             (maybe any content)
       Example2ViewModel.cs

NavigationPaneView.xaml contains the RadPanelBar. I want to use the strength of CM to dynamically create two RadPanelBarItem to show the content of Example1View.xaml or Example2View.xaml.

I want to make the code in NavigationPaneView.xaml like this:
<Grid>
  <Grid.Resources>
    <HierarchicalDataTemplate x:Key="NavigationItemTemplate">
      <ContentControl cal:View.Model="{Binding }" />
    </HierarchicalDataTemplate>
 
    <HierarchicalDataTemplate
      x:Key="rootLevelTemplate"
      ItemTemplate="{StaticResource NavigationItemTemplate}"
         ItemsSource="{Binding }">
      <TextBlock Text="{Binding Name}" />
    </HierarchicalDataTemplate>
  </Grid.Resources>
  <telerik:RadPanelBar
         x:Name="pBar"
         ItemTemplate="{StaticResource rootLevelTemplate}"
         ItemsSource="{Binding NavigationItems}"/>
</Grid>

in NavigationPaneViewModel.cs:
public BindableCollection<INavigationItem> NavigationItems { get; set; }

and
public interface INavigationItem
{
    string Name { get; }
}

in Example1ViewModel.cs: (Example2ViewModel.cs is the same)
[Export(typeof(INavigationItem)),
ExportMetadata("Name", "Example1")]
public class Example1ViewModel : INavigationItem
{
    public string Name
    {
        get { return "Example1"; }
    }
}

Because I'm a newbie for Telerik and CM. So I totally have no idea now. Can anybody kindly give me some hint or help?
Pencil
Top achievements
Rank 1
 answered on 06 Sep 2013
2 answers
109 views
Hi there,
.
I'm a newbie with this control. Now I'm using it directly binded to one dataset.

XAML:

 <telerik:RadGridView x:Name="dgvOrdenes" ShowGroupPanel="False" ShowColumnHeaders="True" ShowColumnFooters="False"
                             ItemsSource="{Binding V_Or2}" HorizontalAlignment="Left"
                             Margin="10,44,0,0" ShowInsertRow="False" VerticalAlignment="Top" Height="216"
                             Width="405" Grid.ColumnSpan="2" Grid.RowSpan="4" >

Code-behind:

        Dim connexio As SqlConnection
        Dim ada As New SqlDataAdapter()
        Dim ds As New DataSet

        connexio = New SqlConnection("Server='ENRIC-PC\ENRIC';Initial Catalog=****;User ID=*****Password=******;current language=spanish")


        connexio.Open()


        ada = New SqlDataAdapter("select * from V_Or2", connexio)
        ada.Fill(ds, "V_Or2")
        Me.dgvOrdenes.DataContext = ds



I'd like to assign manually every column but using the same code-behind, how can I do that?
Obviously this doesn't work ("Modelo" is one of the views' Sql Server fields returned)

            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding V_Or2.Modelo}" Header="First Name" UniqueName="FirstName" />
            </telerik:RadGridView.Columns>

Enric
Top achievements
Rank 1
 answered on 05 Sep 2013
3 answers
332 views
Hi,

I've implemented the ColumnGroups feature on a grid and it works well enough, but I'm running into a problem when the header of the column group exceeds the width of the actual group and it runs over the borders instead of wrapping onto a new line.

There isn't much documentation available on the ColumnGroups as far as I can see, so I'm not sure how we can get around that? Is there a style setting that we can use in the HeaderStyle or is there another way to do it?

Thanks,
Nemanja
F Beto
Top achievements
Rank 1
 answered on 05 Sep 2013
12 answers
583 views
The default grid seems to allow you to enter edit mode by typing a character (mouse clicks don't work) when the editor is disabled. Not only is this inconsistent behavior, but converters can end up throwing exceptions because of invalid input. 

Niki
Top achievements
Rank 1
 answered on 05 Sep 2013
1 answer
117 views
Dear telerik,

I have a dataset and need to do some grouping, aggregates, etc, ..
The pivotgird does all that is needed. However for the export to work, the PivotGrid needs to be materialized (init) and shown before the export function returns any results. Is it possible to use the PivotEngine separately, to do the grouping and aggregating?

Kind Regards,
Boris

Rosen Vladimirov
Telerik team
 answered on 05 Sep 2013
1 answer
188 views

Hi,

I am trying to remove some Document Element as Paragraph, Table, Images from section under RadRichTextBox .
But I want to implement the functionality which allow to add and remove the Document element on button click event.

Suppose I want to remove table from Section so Table having collection of Rows, Row having collection of Cells, Cell having collection of DocumentElement.

When I am get table from section and store it in local dictionary then table is come but not its inner collection like rows collection, cells collection (ie empty collection come), to solve this problem I have taken this values in my another collection.

But after got all the inner collection value I am trying to remove the DocumentElement from section it throws an exception and If I try to remove this DocuemntElement without getting his inner collection values then it removes normally.

reference code If I remove all comments then code thrown an error and with comment it run normally
Telerik.Windows.Documents.Model.Paragraph NextPara;
           try {
               Telerik.Windows.Documents.Model.Span spanbox = editor.Document.CaretPosition.GetCurrentSpanBox().AssociatedSpan;
               if(spanbox.FontWeight==FontWeights.Bold && spanbox.ForeColor==Colors.Aqua)
               {
                   Telerik.Windows.Documents.Model.Section currsect = editor.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection;
                   Telerik.Windows.Documents.Model.Span currspan = editor.Document.CaretPosition.GetCurrentSpanBox().AssociatedSpan;
                   bool check = editor.Document.CaretPosition.MoveToNextInline();
                   bool c=editor.Document.CaretPosition.MoveToNextInline();
                   bool c1=editor.Document.CaretPosition.MoveToNextInline();
                   
                   var documentelement = editor.Document.CaretPosition.GetCurrentParagraphBox();
 
                   if (documentelement != null && documentelement.GetType() == typeof(Telerik.Windows.Documents.Layout.ParagraphLayoutBox))
                   {
                       Telerik.Windows.Documents.Model.Paragraph para = documentelement.AssociatedParagraph;
                       spanbox.Tag = Guid.NewGuid().ToString();
                        
                       string spantext = (para.Inlines.FirstOrDefault() as Telerik.Windows.Documents.Model.Span).Text;
 
                       if (!string.IsNullOrEmpty(spantext) && spantext == "[@[")
                       {
                            
                           NextPara = para.NextSibling as Telerik.Windows.Documents.Model.Paragraph;
                           //var DocEle = new DocumentElementCollection(para);
 
                           //foreach (var item in para.Children)
                           //{
                           //    DocEle.Add(item);
                           //}
                           currsect.Children.Remove(para);
 
                           //DocumentEleCollection.Add(DocEle);
 
                           while (NextPara !=null)
                           {                          
 
                               if (NextPara !=null && (NextPara.Inlines.FirstOrDefault() as Telerik.Windows.Documents.Model.Span).Text == "]@]")
                               {
                                   //var DocEle2 = new DocumentElementCollection(NextPara);
                                   //foreach (var item in NextPara.Children)
                                   //{
                                   //    DocEle2.Add(item);
                                   //}
 
                                  currsect.Children.Remove(NextPara);
                                  //DocumentEleCollection.Add(DocEle2);
                                   break;
                               }
 
                               //var DocEle1 = new DocumentElementCollection(NextPara);
                               //foreach (var item in NextPara.Children)
                               //{
                               //    DocEle1.Add(item);
                               //}
                               currsect.Children.Remove(NextPara);
                               //DocumentEleCollection.Add(DocEle1);
                               NextPara = NextPara.NextSibling as Telerik.Windows.Documents.Model.Paragraph;
                           }
                       }
                   }
 
               }
            
            
           }
           catch (Exception ex)
           { }



Petya
Telerik team
 answered on 05 Sep 2013
1 answer
105 views
Hello, I'm pretty sure it's not possible, but still in cas I'm wrong I prefer to ask.

Is there any possibility to edit a PDF with a WPF Telerik control ?
The only thing that would be coming close to this is the template edition that change the physical aspect of the viewer. But those change are not reported to the final PDF saved.
The RichtextBox doesn't import PDF, so this is also a dead end.

The goal is to be able to insert images at specific positions (like a stamp).

Thanks in advance for your time and answer
Petya
Telerik team
 answered on 05 Sep 2013
1 answer
305 views
hi all 

i'm sorry to write this post under combo box i'm unable to create a new thread on check box so that i'm using it..


my RadGridView DataColumns contains footer with check boxes now if i check the 1st check box the other two should not accept to checked.

how to implement this  in C#, siverlight application



Regards
Dimitrina
Telerik team
 answered on 05 Sep 2013
6 answers
463 views
Hi,

I'm using the DragDropManager, and it works quite fine, but I cannot seem to figure out how to change a DragVisual while Dragging.

the thing is, I have 2 different Dragging methods on an itemsControl : "internal" and "external".
  • For the "internal" one (i.e.: dragging one item around inside the itemsControl, like you do in your TileList), I'm setting the visual in the Draginitialize and it's fine.
  • but for the external one, I have a dragged object entering the itemsControl with its own dragVisual (and it should), then in the DragEnter handler, I do a few things (which work well) and I change the DragVisual, except... I cannot. I have not found a way to change the dragVisual in this handler.

how should I do this, using the DragDropManager ? (I have also looked at the other handlers, but the only one I can find something about the visual is the DragInitialize handler, and it is not fired, since the dragged object does not come from inside the itemsControl)

thanks

Michel
Top achievements
Rank 1
 answered on 05 Sep 2013
0 answers
80 views
Hi Friends,

We have done an application related on waste management.  Shall you guide me for Dashboard design. We created SQL Server Cubes, How to integrate those things to WPF Controls.


Thanks,  
Vinoth Xavier

Vinoth
Top achievements
Rank 1
 asked on 05 Sep 2013
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?