Telerik Forums
UI for WPF Forum
3 answers
133 views
Hi,

my approach (using MVVM) is something like your "OrgChart" example.

Assume this example, where you start with the CEO predefined.
Then from a list the user can drag employees to  the chart.
Employees can change their position (by being dragged to a different "chief / leader").
Every Employee is assigned to another one.
There are kind of employees which may not "rule" others (let's say trainees). These employees can't act as "drop destination"

So the rules are:
- One node is fixed (CEO)
- the user must drop the new / existing Node on an existing one
- depending on the node type dropping is enabled or not (Visual feedback should be provided - like containers do)

After a drop operation I recalculate the Org-Model add / remove connectors and redraw the chart.

Is there an easy way to achieve this?

Manfred
Zarko
Telerik team
 answered on 22 Jul 2013
1 answer
117 views

hi

I used Blend 2012, when I retemplate the control (without doing anything to the generated style) i loss the top left radTickBar

attached image of it working, not working and code (not working but remove style={} and it works)

I am using 2012.3.1017.40

thanks
martin

     <telerik1:RadSlider Height="100"
   HandlesVisibility="Visible"
   TickPlacement="TopLeft"
   TickFrequency="1"
   IsSnapToTickEnabled="True"
   SelectionStart="0"  
   SelectionEnd="21"  
   MinimumRangeSpan="1"
   Minimum="0"
   SmallChange="1"
   LargeChange="1"
   Maximum="21"
   IsSelectionRangeEnabled="True" Style="{DynamicResource NotWorkingStyle}" >
   <telerik1:RadSlider.TickTemplate>
    <DataTemplate>
     <Grid>
      <TextBlock Text="{Binding}" FontSize="11"/>
     </Grid>
    </DataTemplate>
   </telerik1:RadSlider.TickTemplate>
  </telerik1:RadSlider>
Tina Stancheva
Telerik team
 answered on 22 Jul 2013
3 answers
55 views
Hi

My application tracks "items", when they arrive they're placed into an area and my timeline shows a span from when they arrive to when they leave.

I group my timeline objects using the AreaName property. An item can be moved between areas, when an item is moved the span stops in the first area and a new span is created in the new area.

What I want to do is highlight the whole history of the item when any of the sectors is selected. I.e. select the spans in areas "a", "b" and "c" for item "x" in the different area groups when the item is selected in area "a"

I hope this makes sense.
Thanks
Ben

Petar Kirov
Telerik team
 answered on 22 Jul 2013
3 answers
720 views
How do I databind the SelectedItems property? I'm just getting the following compilation error and can't find any examples of how it's done in the documentation

The property "SelectedItems" does not have an accessible setter.

Petar Kirov
Telerik team
 answered on 22 Jul 2013
1 answer
106 views
We have an existing WinForms app that we would like to migrate to WPF using your WPF support. The plan was to implement the main app (including docking) in WPF and then embed the existing WinForms controls into it until we get around to rewriting them using WPF. This seems to work reasonably well until we float one of the panes. Then the WinForms control is not rendered. If we dock it back again the control shows up. From what I can tell on the Forums this is/was a known issue. Should this now be possible?

Thanks
Dave Goughnour
Konstantina
Telerik team
 answered on 22 Jul 2013
4 answers
145 views
Hi

We are looking at using Telerik charts to replace an older WinForms charting widget, and we need to maintain backwards compatibility in order to maintain the correct look and feel.  Our previous charting widgets heavily supported 3D charting, but Telerik's 3D charts are not particularly similar in visual style to the ones we are looking to replace.  I have been looking at ChartArea, and have noticed that there is a Template3D that is used to dictate how the 3D charts are set up visually, and this would be perfect to use for what we want to do.  In attempting to create a custom style in order to specify our own Template3D, I have been running into a few problems.  Currently, I have a ChartArea style that specifies our custom Template3D, which I have pulled from looking at the default Template3D normally used:

<Style x:Key="defaultAreaStyle" TargetType="c:ChartArea">
        <Setter Property="Template3D">
            <Setter.Value>
                <ControlTemplate TargetType="c:ChartArea">
                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <ItemsPresenter/>
                        <Grid x:Name="PART_Container"/>
                        <c:ViewportPanel x:Name="PART_CameraExtensionCanvas">
                            <Viewport3D x:Name="PART_ViewPort3D">
                                <Viewport3D.Camera>
                                    <PerspectiveCamera LookDirection="0.2,-0.23,-1" Position="-40,37.5,195"/>
                                </Viewport3D.Camera>
                                <ModelVisual3D>
                                    <ModelVisual3D.Content>
                                        <Model3DGroup>
                                            <AmbientLight Color="#FF606060"/>
                                            <DirectionalLight Color="#FF989898" Direction="-0.5,-0.4,-1"/>
                                        </Model3DGroup>
                                    </ModelVisual3D.Content>
                                </ModelVisual3D>
                                <ContainerUIElement3D>
                                    <ContainerUIElement3D.Transform>
                                        <Transform3DGroup>
                                            <TranslateTransform3D OffsetX="-50" OffsetY="-37.5"/>
                                        </Transform3DGroup>
                                    </ContainerUIElement3D.Transform>
                                    <c:PlaneZX AdornerLayer="{x:Null}" Height="2" SecondaryTicksSource="{Binding AxisX.TickPoints, RelativeSource={RelativeSource TemplatedParent}}" SecondaryAxis3DPoints="0,0,10.1 100,0,10.1">
                                        <c:PlaneZX.PositionTransform>
                                            <TranslateTransform3D OffsetZ="0" OffsetX="0" OffsetY="-2"/>
                                        </c:PlaneZX.PositionTransform>
                                    </c:PlaneZX>
                                    <c:PlaneXY AdornerLayer="{x:Null}" Depth="2" PrimaryTicksSource="{Binding AxisX.TickPoints, RelativeSource={RelativeSource TemplatedParent}}" SecondaryTicksSource="{Binding AxisY.TickPoints, RelativeSource={RelativeSource TemplatedParent}}">
                                        <c:PlaneXY.PositionTransform>
                                            <TranslateTransform3D OffsetZ="-2" OffsetX="0" OffsetY="0"/>
                                        </c:PlaneXY.PositionTransform>
                                    </c:PlaneXY>
                                    <c:PlaneYZ AdornerLayer="{x:Null}" PrimaryTicksSource="{Binding AxisY.TickPoints, RelativeSource={RelativeSource TemplatedParent}}" PrimaryAxis3DPoints="0,0,10.1 0,75,10.1" Width="2">
                                        <c:PlaneYZ.PositionTransform>
                                            <TranslateTransform3D OffsetZ="0" OffsetX="-2" OffsetY="0"/>
                                        </c:PlaneYZ.PositionTransform>
                                    </c:PlaneYZ>
                                    <c:ItemsPresenter3D/>
                                </ContainerUIElement3D>
                            </Viewport3D>
                            <c:LabelsControl x:Name="PART_LabelsControl" ClipToBounds="True">
                                <c:LabelsControl.ItemsPanel>
                                    <ItemsPanelTemplate/>
                                </c:LabelsControl.ItemsPanel>
                                <c:LabelsControl.ItemTemplate>
                                    <DataTemplate>
                                        <c:LabelLayer>
                                            <c:LabelLayer.ItemsPanel>
                                                <ItemsPanelTemplate>
                                                    <c:LabelLayerItemsPanel IsItemsHost="True"/>
                                                </ItemsPanelTemplate>
                                            </c:LabelLayer.ItemsPanel>
                                            <c:LabelLayer.ItemTemplate>
                                                <DataTemplate>
                                                    <Border BorderBrush="#FF5C5C5C" BorderThickness="1" CornerRadius="3" LayoutTransform="{Binding Transform}">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                <GradientStop Color="#FFCCCCCC" Offset="1"/>
                                                                <GradientStop Color="White"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <TextBlock Foreground="Black" FontWeight="Bold" HorizontalAlignment="Center" Margin="4,0">
                                                            <TextBlock.Text>
                                                                <Binding>
                                                                    <Binding.Converter>
                                                                        <c:LabelFormatConverter/>
                                                                    </Binding.Converter>
                                                                </Binding>
                                                            </TextBlock.Text>
                                                        </TextBlock>
                                                    </Border>
                                                </DataTemplate>
                                            </c:LabelLayer.ItemTemplate>
                                        </c:LabelLayer>
                                    </DataTemplate>
                                </c:LabelsControl.ItemTemplate>
                            </c:LabelsControl>
                        </c:ViewportPanel>
                        <c:NoDataControl x:Name="PART_NoData" Style="{TemplateBinding NoDataControlStyle}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

However, when I try to assign this style to the ChartArea of any 3D chart, I get a null reference exception in RadChart.  The call stack gives the last few calls as:
 
Telerik.Windows.Controls.Charting.dll!Telerik.Windows.Controls.Charting.Series3D.ChartArea.get()
Telerik.Windows.Controls.Charting.dll!Telerik.Windows.Controls.Charting.Series3D.LabelsControl.get()
Telerik.Windows.Controls.Charting.dll!Telerik.Windows.Controls.Charting.Series3D.RemoveLabelLayer()

So my question is how do I properly set Template3D (if it even possible)?  



Trystan
Top achievements
Rank 1
 answered on 22 Jul 2013
3 answers
221 views
When virtualizing is turned on, a group is collapsed when its out of visible area and expands if it needs to when it returned to the visible area.  I need to display a count of all expanded groups for the user.  How can I get the "actual" expand count from the RadGridView?  Since the RadGridView is auto-expanded when they come back, it obviously knows whatn needs to be expanded.
Dimitrina
Telerik team
 answered on 22 Jul 2013
1 answer
171 views
Is there any means of setting the QueryableEntityCollectionView to a subset of data using a linq query or some other means?

For example the following code will include all recurds in tbUser
New QueryableEntityCollectionView(Of DataModelEF.tbUser)(DbContext, "tbUsers")

I only want active users to be included based on a flag.  It's preferable if the user is blind to this filter in that the column on the grid doesn't show that it's been filtered.

I see that there is another constructer that uses ObjectQuery but I can't get my head around how this works and I can't seem to find any examples.

Any help is appreciated.

Rossen Hristov
Telerik team
 answered on 22 Jul 2013
3 answers
141 views
Hi Telerik,
 
 I have an mvvm solution. In my viewmodel I have an QueryableCollectionView of the class "BaseClass" objects and an standalone "BaseClass" element(let's call it seletedElem). The "BaseClass" class have a private QueryableCollection of the "ChildClass" objects(let's call it SCollection), and a property that returns this collection. Both classes are implementing the following interfaces:  INotifyPropertyChanged, IDataErrorInfo, IEditableObject. In my view I have raddatagrid which itemssource is binded to the ObservableCollection of "BaseClass" objects from viewmodel and selected item is binded to the standalone "BaseClass" object - selectedElem.

The Dataform is binded to the currently selected grid item in this way :

  ItemsSource="{Binding ElementName=xxx,Path=DataContext.seletedElem.SCollection}"

Then before the first DataGrid's selection changed event, or after the new item is inserted to the grid, when I press add button of the raddataform the current item of the SCollection is always an empty item of type ChildClass, but after the grid's selection changed event(when one of the existing items is selected) the current item of the SCollection is always null and im not able to edit it's properties.

Is there anyway to fix this behaviour?

Regards,
Tomasz
Maya
Telerik team
 answered on 22 Jul 2013
1 answer
64 views
Dear support,

We have the problem that in DayView some entries are out of the visible range.
Instead of scrolling down to see if there are items, we would like to have a mark that shows if there are items that are currently not shown.
Is this feature planned? Or is it possible to implement it by myself?

I have attached an image to clarify my request.

Regards
Rosi
Telerik team
 answered on 22 Jul 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?