Telerik Forums
UI for WPF Forum
3 answers
566 views

I have a Floating Radpane (2.gif) and I want this to fit the content inside. Is it possible to make it behave like the 1.gif grid?

What I want is for the width and height to be dynamic depending on the content.

The RadPane structure is as follows:

<telerik:RadDocking x:Name="RadDockingFloating">
    <telerik:RadSplitContainer x:Name="RadSplitContainer" Visibility="Collapsed" telerik:RadDocking.FloatingLocation="500,50"  InitialPosition="FloatingOnly">
        <telerik:RadPaneGroup >
            <telerik:RadPane IsHidden="True" ContextMenuTemplate="{x:Null}" TitleTemplate="{StaticResource TitleTemplate}"  x:Name="TooltipHeader" CanUserPin="False">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="90" />
                        <RowDefinition Height="20" />
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0">
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="OhlcChartTextBlock" />
                    </StackPanel>
                    <Border Grid.Row="1" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel >
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="VolumeChartTextBlock" />
                        </StackPanel>
                    </Border>
                    <Border x:Name="TooltipFloatBorder" Grid.Row="2" Margin="0, 3, 0, 0" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel x:Name="TooltipFloat">
 
                        </StackPanel>
                    </Border>
                    <Border Grid.Row="3" Margin="0, 3, 0, 0" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel>
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="Order"/>
                        </StackPanel>
                    </Border>
                </Grid>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>

Thank you
Gerard.

Stefan Nenchev
Telerik team
 answered on 17 Jan 2017
5 answers
267 views

Hi,

I've written a custom provider (using a custom TileMapSource). I'm using EPSG900913Projection but the tile source I'm using does not have data for the entire world. The first problem I have is that when I first render the map it's using GeoBounds for the entire world. The problem is that I don't statically know the extent of the data source until I load the map, so I can't set the GeoBounds for RadMap and my custom provider in xaml. I've tried hooking event handlers for my user control "Loaded" event, also in RadMap.InitializeCompleted where I've tried to set the GeoBounds for both the RadMap and the custom provider but still the first time the map renders it covers the whole world.

I'd also like to limit the zoom range the user can use i.e. I'd like to stop the user zooming out more than one zoom level from the initial data extent. Again, because the data extent is not statically known I can't set the min and max zoom to fixed values. Is there some way to calculate the zoom level corresponding to the available data extent?

I have wired up a refresh button that when clicked calls RadMap.SetView passing a locationRect that I've constructed from the data available, and that correctly sets the view (and zoom level) for the map.

Can you suggest where I might be going wrong?

Thanks,

Pete

 

Petar Mladenov
Telerik team
 answered on 17 Jan 2017
1 answer
138 views

Hi guys!
I found a problem regarding text size change and following text selection.

These are the minimal steps to replicate the bug:
* Start WPF demo and select RichTextBox demo
* Select first paragraph under "Overview": from "RadRichTextBox is a control" to "bookmarks and comments."
* From the upper toolbar, change font size to 20
* Scroll down to the second paragraph ("The control can preview... tweaking of images."), you will be only able to select words from the first and fourth line but NOT from the second or the third.

The problem disappears immediately after using another format command or if you change the paragraph text. It seems to me that font size change doesn't invoke a document measure/rearrange.

Thanks for your assistance.
Fabrizio Piazza

Tanya
Telerik team
 answered on 17 Jan 2017
1 answer
268 views

Hi

 

I am trying to create my own custom column based on GridViewBoundColumnBase to use with RadGridView.

When using a column like GridViewDataColumn intellisense knows that the Binding in DataMemberBinding uses the context of an item specified in its parents RadGridView's ItemsSource. This gives me the proper suggestions from intellisense to bind to.

With my custom column I am unable to replicate this behavior. I only inherit the datacontext from the parent RadGridView. How can I get around this?

(PS: I need to create a custom column, I do not want to set the DataTemplate of GridViewColumn specifically for every table)

Jan Terje
Top achievements
Rank 1
 answered on 17 Jan 2017
1 answer
277 views
I'd like to load an .xslx file for viewing only. In other words I want to stop the user from adding or changing anything. Is there any way I can set read only?
Dinko | Tech Support Engineer
Telerik team
 answered on 17 Jan 2017
3 answers
397 views

There is a small probability issue:

when in a child thread  call the RadWindow.Alert method  to show a message window 

i use Application.Current.Dispatcher.BeginInvoke to call main thread

 Application.Current.Dispatcher.BeginInvoke((Action)delegate
                {
                    RadWindow.Alert(new DialogParameters { Header = StringResources.GetCodeMessage("TiShi"), Content = "error", Owner = Application.Current.MainWindow });
                });

then there is a NullReferenceException  occur

the exception stack is as following

在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__7(UIElement item)
   在 System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   在 System.Linq.Enumerable.Max(IEnumerable`1 source)
   在 System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
   在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__6(Double total, List`1 next)
   在 System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   在 Telerik.Windows.Controls.Primitives.TabStripPanel.MeasureOverride(Size availableSize)
   在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   在 System.Windows.UIElement.Measure(Size availableSize)
   在 System.Windows.ContextLayoutManager.UpdateLayout()
   在 System.Windows.UIElement.UpdateLayout()
   在 System.Windows.Interop.HwndSource.SetLayoutSize()
   在 System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   在 System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   在 System.Windows.Window.SetRootVisual()
   在 System.Windows.Window.SetRootVisualAndUpdateSTC()
   在 System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   在 System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   在 System.Windows.Window.CreateSourceWindowDuringShow()
   在 System.Windows.Window.SafeCreateWindowDuringShow()
   在 System.Windows.Window.ShowHelper(Object booleanBox)
   在 System.Windows.Window.Show()
   在 System.Windows.Window.ShowDialog()
   在 Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
   在 Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
   在 Telerik.Windows.Controls.RadWindow.ShowDialog()
   在 Telerik.Windows.Controls.RadWindow.ConfigureModal(RadAlert content, DialogParameters dialogParams)
   在 Telerik.Windows.Controls.RadWindow.Alert(DialogParameters dialogParameters)
   在 Eurlanda.DataShire.DataShireIDE.MainUserControl.<MainUserControl_Loaded>b__13() 位置 g:\datashire_cloud_IDE\Eurlanda.DataShire.DataShireIDE\MainUserControl.xaml.cs:行号 528
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I have no idea about this  issue  

Is any solution to avoid?

 

Polya
Telerik team
 answered on 17 Jan 2017
3 answers
100 views

Is it possible to change the way the RadDatePicker behaves when I write numbers ? 

For example I want to write 0101 and Press Enter, the Date should be 01.01.2017 (if the year is not given the current year should be taken). Instead I get 03.01.0101.  Is it possible to reprogram this behavior ?

Devid
Top achievements
Rank 1
 answered on 17 Jan 2017
3 answers
234 views
I am not able to launch the WPF Demos, in my system, i have the SQL'14 express version. but when i start to install the WPF they said to install SQL'08 Express so that i cant install it. they are showing the  below error

component SQL Server 2008 express has failed to install with the following error message" An error occurred attempting to install SQL server 2008 express service pack.1"
The Following COmponenets failed to install
-SQL server 2008 Express/
Kalin
Telerik team
 answered on 17 Jan 2017
4 answers
258 views

Hi,

I'm new in WPF and I would like to know is possible to display in a RadGridView the headers with their details?

I have two DataTable which the first keep the header values and the second Datatable keeps the details values from a database. I'm able to display the header values in the RadGridview but I couldn't find how to display their details for each header.

For Example:

The RadGridView shows the Sales Number, Sales date and total then when the user clicks in the Sales number row it displays the Sales details with all the products and their descriptions.

I would appreciate your help or any suggestions.

Regards,

Oscar

Oscar
Top achievements
Rank 1
 answered on 16 Jan 2017
7 answers
310 views

Hello Telerik,

 

In my char, i'm using Cartesian & Bar Series. For the BarSeries, I'm using a "Custom Rectangle". My code :

BarSeries seriePluvio = new BarSeries();
 
//set attributs...
//....
//-------------
 
//Create a template for for custom bar
DataTemplate dt1 = new DataTemplate { DataType = typeof(System.Windows.Shapes.Rectangle) };
FrameworkElementFactory dt1Factory = new FrameworkElementFactory { Type = typeof(System.Windows.Shapes.Rectangle) };
 
//Set color for the bar --> IS OK
dt1Factory.SetValue(System.Windows.Shapes.Rectangle.FillProperty, new SolidColorBrush(param.CouleurMesuresValides));
 
//Set the width of the bar --> IS OK
double d = new double();
d = (Convert.ToDouble(param.EpaisseurTraitMesuresValides));
dt1Factory.SetValue(System.Windows.Shapes.Rectangle.WidthProperty, d);
 
//Set the line style of the bar --> IS NOK
dt1Factory.SetValue(System.Windows.Shapes.Rectangle.StrokeDashArrayProperty, new DoubleCollection { 2, 2, 2, 2 });
 
//The end of the code...
dt1.VisualTree = dt1Factory;
seriePluvio.PointTemplates.Add(dt1);
//...............

 

So, my problem is that the LineStyle is not applied. I tried with differents values/parameters for the DoubleCollection but this is always the same result. No visual changement.

 

I'm using StrokeDashArrayProperty because this is the used property for the CartesianSeries.

Can you help me ?

 

Thank you very much !

Tanya
Telerik team
 answered on 16 Jan 2017
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?