Telerik Forums
UI for WPF Forum
4 answers
393 views

Hi!

I need your help. I have a details panel with toolbar that shows detail information from a RadgridView, next is snippet code:

<StackPanel x:Name="pnlToolbar" Height="55" Margin="0,0,3,0" Width="416">
<telerik:RadToolBar x:Name="tlbDetalle" Orientation="Horizontal" OverflowButtonVisibility="Hidden" Height="54" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" BorderBrush="#FFE9F2FF" BorderThickness="1" HorizontalAlignment="Right" Width="413">
<Button Tag="btnAnterior" Click="btnToolBar_Click">
<Image Source="/App_LocalResources/Imagenes/FechaArriba.png" Stretch="UniformToFill" Height="41" Width="41" />
</Button>
<Button Tag="btnSiguiente" Click="btnToolBar_Click">
<Image Source="/App_LocalResources/Imagenes/FechaAbajo.png" Stretch="UniformToFill" Height="41" Width="41" />
</Button>
<Button x:Name="btnInsertar" Tag="btnInsertar" Click="btnToolBar_Click">
<Image Source="/App_LocalResources/Imagenes/HojaNueva.png" Stretch="UniformToFill" Height="41" Width="41" />
</Button>
<Button Tag="btnGrabar" Click="btnToolBar_Click">
<Image Source="/App_LocalResources/Imagenes/Almacenar.png" Stretch="UniformToFill" Height="41" Width="41" />
</Button>
<Button Tag="btnEliminar" Click="btnToolBar_Click">
<Image Source="/App_LocalResources/Imagenes/Cesta.png" Stretch="UniformToFill" Height="41" Width="41" />
</Button>
</telerik:RadToolBar>
</StackPanel>

<Grid x:Name="pnlDetails Height="249" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Label x:Name="lblCodigo" Content="Código" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="8,8.5,76,8.499"/>
  <telerik:RadMaskedTextBox x:Name="fmtCodigo" IsEnabled="{Binding kernel:App_PageKernel.EsRegistroNuevo}" Style="{DynamicResource Estilo1MaskedTextBox}" Value="{Binding ElementName=grdGridConsulta, Path=SelectedItem.CA001, Mode=TwoWay, UpdateSourceTrigger=Explicit, Converter={StaticResource ValueConverter}}" Validation.ErrorTemplate="{StaticResource PlantillaErrores}" Margin="87,0,0,8.5" HorizontalAlignment="Left" Width="51.92" VerticalAlignment="Bottom" TabIndex="0" Mask="n0" MaskType="Numeric" HorizontalContentAlignment="Right">
   <Label x:Name="lblTitulo" Content="Titulo" Margin="21,84,0,0" VerticalAlignment="Top" Width="77" Height="27"/>
<TextBox x:Name="txtTitulo" IsEnabled="{Binding kernel:App_PageKernel.EsRegistroNuevo}" Style="{StaticResource Estilo1TextBox}" Text="{Binding ElementName=grdGridConsulta, Path=SelectedItem.CA002, Mode=TwoWay, UpdateSourceTrigger=Explicit}" Validation.ErrorTemplate="{StaticResource PlantillaErrores}" HorizontalAlignment="Left" Margin="102,84,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="27" TabIndex="1" Width="230"/>
<Label x:Name="lblEjecutable" Content="Ejecutable" Margin="21,121,0,0" VerticalAlignment="Top" Width="77" Height="27"/>
<TextBox x:Name="txtEjecutable" IsEnabled="{Binding kernel:App_PageKernel.EsRegistroNuevo}" Style="{StaticResource Estilo1TextBox}" Text="{Binding ElementName=grdGridConsulta, Path=SelectedItem.CA003, Mode=TwoWay, UpdateSourceTrigger=Explicit}" Validation.ErrorTemplate="{StaticResource PlantillaErrores}" HorizontalAlignment="Left" Margin="102,121,0,0" TextWrapping="Wrap" VerticalAlignment="Top" TabIndex="2" Width="301" Height="27"/>

...

...

</Grid>

I wanted to show errors validation by using a Errors Template and setting Validation.ErrorTemplate="{StaticResource PlantillaErrores}" in every control, next is the code from Page.Resources:

<ControlTemplate x:Key="PlantillaErrores">
<StackPanel x:Name="PlantillaErrores">
<StackPanel Orientation="Horizontal">
<Image Height="20" Margin="0,0,3,0" Source="/App_LocalResources/Imagenes/Advertencia.png">
<Image.Effect>
<DropShadowEffect BlurRadius="14" Direction="276" ShadowDepth="1" Color="#FFC2BA9E"/>
</Image.Effect>
</Image>
<Border BorderBrush="Red" BorderThickness="1">
<AdornedElementPlaceholder/>
</Border>
</StackPanel>
</StackPanel>
</ControlTemplate>

Everything is working OK, when errors happen, image and red rectangle around control is showed in correct way, but something extrange is happening when I need to hide Details Panel, the way I do this is by using an opacity effect from 1 to 0 through storyboard action, not hidden by Visibility property, problems is that the Image and Red Rectangle continues showing and they don't be hidden, any way both of them get hidden is when I move mouse over any toolbar button - curiously -, so, image and red rectangle disappear. Maybe something about rendering, I guess, so I tried by this.InvalidateVisual(); into my page class but nothing changes, image and red rectangle continues showing. Same way happens in the other way, when I need to make visible details panel by changing opacity from 0 to 1 through storyboard action and previously image and rectangle was hidden by the action of move mouse over any toolbar button, and next details panel get visible, image and red rectangle continues hidden, only action of move mouse over any toolbar button makes image and red rectangle appear again.

thanks for your help!

Herr
Top achievements
Rank 2
 answered on 28 Oct 2010
1 answer
105 views
I am getting a Target invocation exception while adding multiple series to the Rad Chart.

I have attached a screen shot of the exception.

Thanks,
Farhan
Yavor
Telerik team
 answered on 28 Oct 2010
1 answer
121 views
what is the best method of hiding the HierarchyExpandButton and the column that it adds to the GridView
Vanya Pavlova
Telerik team
 answered on 28 Oct 2010
5 answers
131 views
Hello!
I need in my application the docking feature of the panes - to be able to put them in any position I need in the docking panel, during runtime. But somehow I need to constrain them so there cannot be any floating panel - I mean if the user drags a RadPane but he is not positioning it in any other place, the RadPane will go back to it's initial position.
Setting the CanFloat property on false is just freezing the pane, but I don't want this behavior.

Is this possible?

Thank you!
Roxana
RoxanaC
Top achievements
Rank 1
 answered on 28 Oct 2010
4 answers
334 views
WPF, VS 2010

I have a treeview bound to a collection of objects that implement INotifyPropertyChanged.  The AssociatedOfferings child collection is a collection of the same type of object.  When I change a value of one of the objects from the ViewModel the change is not reflected in the TreeView.  My View is as follows:

<HierarchicalDataTemplate x:Key="TopItemTemplate" ItemsSource="{Binding AssociatedOfferings}">
      <StackPanel Orientation="Horizontal">
        <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsEnabled}"   />
        <TextBlock Text="{Binding Name}" Margin="10,0,0,0" />
      </StackPanel>
    </HierarchicalDataTemplate>
  
<telerik:RadTreeView ItemsSource="{Binding Items}" DataContext="{Binding}" ItemTemplate="{DynamicResource TopItemTemplate}" />

Then in the ViewModel if I take one of the objects and set its IsSelected property to True, or the Name to something else, the change is not reflected in the View.
Betsy
Top achievements
Rank 1
 answered on 27 Oct 2010
4 answers
276 views
Hi,
 I have downloaded the beta version of the WPF RadMap specifically to look at the shape file importing.
I have used your examples to render your example .shp files

ThematicLayer.Reader =

 

new MapShapeReader();

 

ThematicLayer.Reader.ReadCompleted += MapShapeReader_ReadCompleted;

ThematicLayer.Reader.Source =

 

new Uri(string.Format(ShapeFilePath, new object[] { layerName, ShapeExtension }), UriKind.Absolute);

 

ThematicLayer.Reader.DataSource =

 

new Uri(string.Format(ShapeFilePath, new object[] { layerName, DbfExtension }), UriKind.Absolute);

 

ThematicLayer.Reader.SourceType =

 

ShapeSourceType.ShapeFile;

 


this works fine, but when I use some shape files that I have bought I get an error when the shapes are drawn on the canvas

  Message=Width and Height must be non-negative.
  Source=WindowsBase
  StackTrace:
       at System.Windows.Size..ctor(Double width, Double height)
       at Telerik.Windows.Controls.Map.MapCanvas.SetItemPosition(MapCanvasItem item, Point point) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 371
       at Telerik.Windows.Controls.Map.MapCanvas.ArrangeItem(MapCanvasItem item) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 696
       at Telerik.Windows.Controls.Map.MapCanvas.ArrangeOverride(Size finalSize) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 387
       at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       at System.Windows.UIElement.Arrange(Rect finalRect)
       at System.Windows.ContextLayoutManager.UpdateLayout()

If I load my shape files into MapWindowGIS, they require 3 files, the .shp, the .dbf and the .shx.  I can't see where to specify the location of the .shx file in the MapShapeReader?

Am I missing something?

Thanks
Simon

Simon
Top achievements
Rank 1
 answered on 27 Oct 2010
4 answers
277 views
Hi,

I would like to know how we can increase the node spacing. Any sample or pointer would be really appreciated.

Warm Regards
Madhu
Madhu
Top achievements
Rank 1
 answered on 27 Oct 2010
7 answers
474 views
Hi

When a RadTreeViewItem is selected and the focus is on another element, a black dotted border appears on the focused element.
This looks like the image shown here:
http://blogs.windowsclient.net/anshulee/archive/2008/05/16/removing-the-dotted-border-around-selected-wpf-ui-element.aspx

To remove it using the vanilla WPF elements, I had to use something like this:
<Style TargetType="{x:Type TreeViewItem}"> 
   
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
</Style>

So I tried this with RadTreeViewItem i.e.
<Style TargetType="{x:Type telerik:RadTreeViewItem}"> 
   
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
</Style>

but this does not work. Do you have any workarounds for not showing the dotted border?

Many thanks



Madhu
Top achievements
Rank 1
 answered on 27 Oct 2010
1 answer
89 views
I need to convert some cells into GridViewComboBoxColumn only while inserting.  I tried during BeginningEdit event but was unsuccessful.  They need to be readonly during edit.

During AutoGeneratingColumns event they can be converted fine but that causes the column to be a combobox during edit also.  Existing records might have values which are not valid for the combobox.  So, some records do not display existing values.  Also data is generated dynamically so I can't use templates.  Any suggestions?
Maya
Telerik team
 answered on 27 Oct 2010
3 answers
146 views
Hello Telerik Team,

I am currently implementing a WPF RadChart and I am very impressed, but I have one slight problem.

I am using multiple Y-Axis, up to five, and I need the zooming an scrolling feature, as I have to visualize long term data.
I am currently facing two problems:

1) Even when completely zoomed out, I have Scrollbars drawn at each axis, minimzing the screen region for the graph.

2) Every Y-Axis draws a scrollbar. As they all are synchronized anyway, I would like to hide the scrollbards of the additional Y Axis, as this also reduces the graph screen region.

Currently, I am loosing a huge amount of screen real estate to the scrollbars. Is there any way to control the visibility of the bars at each axis? I couldn't find something in the documentation about this.

best regards

Ulrik
Evgeni "Zammy" Petrov
Telerik team
 answered on 27 Oct 2010
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?