Telerik Forums
UI for WPF Forum
1 answer
297 views
Hi!

On my RadDiagram control I have generated elements with connections. How to prevent moving connection?
I want to allow the user only to detach and attach the connection. Forbidden situation is visualised in forbiddenSituation.PNG.  If the user unpin the connection and he/she doesn't drag connection to another item, the connection shouldn't be changed. So all connections should have Target and Source element.

I use ConnectionManipulationCompleted event. When ManipulationStatus is Moved I want to Undo this, but the truth is only the previous change will be undone, not current connection moving.

I was thinking I can cache previous state of connection (target and source) on ConnectionManipulationStared and set those if on ConnectionManipulationCompleted target or source are null. But it doesn't work.
Martin Ivanov
Telerik team
 answered on 07 Mar 2016
1 answer
195 views

In my chart I have dashed grid line custom lines but they're on the top of my customized data points. This doesn't happen on the regular Y axis lines.(see Screenshot)

I don't want my grid lines annotations to be on the top of my data points - How to fix this?

Thanks!

Ivan
Telerik team
 answered on 07 Mar 2016
1 answer
132 views
How can I reset a clod control? I want an event to clear the uploaded files on subscribe of an event.
Petar Marchev
Telerik team
 answered on 07 Mar 2016
3 answers
146 views

Hi,

 

 Currently I am trying to automate a Test flow in an application which uses Telerik controls ( RadControls for WPF Q2 2013, file version: 2013.2.611.45) using Visual studio 2012 (Coded UI Test). But while trying to find the controls I am facing issues as it is finding only very few properties. [Control type, control tag, technology name = UIA].

 

Is this correct functioning of Visual studio coded UI. If not can you please guide me about what steps to follow to rectify the error. 

 

N.B. we already followed the steps mentioned in  "http://docs.telerik.com/devtools/wpf/coded-ui-support.html" to install the telerik control support dll in visual studio. But still facing issues.

 

ANy help is appreciated.

 

THanks 

AR

Tanya
Telerik team
 answered on 04 Mar 2016
6 answers
173 views

Hi,

I have two different AggregateFunctions in a GridViewDataColumn, and I would like to show the results in different objects. The first one should be shown in a TextBox, and the second, in a TextBlock.

This is the closer I got so far, but, obviously, both AggregateFunctions results are shown in a TextBox:

<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" Header="Stadium capacity">
    <telerik:GridViewDataColumn.AggregateFunctions>
        <local:CapacityAggregation />
        <local:YearsLeftAggregation />
    </telerik:GridViewDataColumn.AggregateFunctions>
    <telerik:GridViewDataColumn.Footer>
        <StackPanel Orientation="Vertical">
            <telerik:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <TextBox VerticalAlignment="Center" Text="{Binding FormattedValue}" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </telerik:AggregateResultsList>
        </StackPanel>
    </telerik:GridViewDataColumn.Footer>
</telerik:GridViewDataColumn>

How can I achieve this? Any help would be appreciated.

Leonardo
Top achievements
Rank 1
 answered on 04 Mar 2016
1 answer
201 views

I'm using the RadGridView.ExportToXlsx() to export my grid to an Excel (.xlsx) file. The exported File works perfectly in Excel 2016, but in OpenOffice (Apache_OpenOffice_4.1.2_Win_x86_install_de) I get the error "Wrong Format".

The only workaround is to open the exported file in Excel and save it. After that the file can be opened in OpenOffice.

I can reproduce the error with the WPF Controls Examples Q1 2016 SP1 (Exporting to Xlsx and Pdf fromats).

 

Is there any way to solve this?

Yoan
Telerik team
 answered on 04 Mar 2016
5 answers
285 views

Hi!

Let's say I have a list of 100 items with an Id ranging from 1 to 100. I put them in a QCV, ordered by Id, with a page-size of 20 resulting in 5 pages. I bind that QCV to a GridView and a DataPager. Page 1 is displayed which means Ids 1 to 20 are visible in the Grid.

Question: what is the most efficient way to find and display the item with a specific Id without loading all pages and skipping through all items in a page? Please give an example!

Regards
Heiko

Maya
Telerik team
 answered on 04 Mar 2016
2 answers
156 views

Hi,

Say I have a timeline with a duration of 180hours. If I add events with duration of for instance 1 minute and zoom the timeline all the way out, the events become completely hidden. Zooming in on the area of the event will eventually make the event appear again.

Is there a way to set a minimum event width - at the very least a dot or a small vertical mark - to visually indicate that there exists an event here? 

I am using custom templates for the events. 

Thanks,

Kato

Kato
Top achievements
Rank 1
 answered on 04 Mar 2016
13 answers
235 views

Hello!

I have a question about Hierarchy and IsExpandable, In my GridView ,user can add and remove father and son items.

I tried the code like this two way,they can set  IsExpandable to false or true when loaded or add items,

but when I remove all the sub items of a father item, the IsExpandable can not set to false,is there any way to solve it? thanks a lot.

<telerik:RadGridView.RowStyle>
    <Style TargetType="telerik:GridViewRow">
   <Setter Property="IsExpandable" Value="True"/>
   <Style.Triggers>
    <DataTrigger Binding="{Binding Converter={StaticResource integerToBooleanConverter}, Path=SubList.Count}" Value="False">
    <Setter Property="IsExpandable" Value="False"/>
    </DataTrigger>
    </Style.Triggers>
 </Style>
 </telerik:RadGridView.RowStyle>
<i:Interaction.Behaviors>
  <behavior:IsExpandableBehavior IsExpandableSourcePropertyName="SubList.Count" />
 </i:Interaction.Behaviors>

Wang
Top achievements
Rank 1
 answered on 04 Mar 2016
10 answers
654 views

I have been trying to write a TiledMapSource that reads from the mbtiles format https://github.com/mapbox/mbtiles-spec/blob/master/1.1/spec.md

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace RadMapMbtilesDemo
{
    using System.Data.SQLite;
    using System.Diagnostics;
    using System.IO;
    using System.Security.AccessControl;
    using System.Windows.Media.Imaging;
 
    using Telerik.Windows.Controls.Map;
 
    public class MbTileSource : TiledMapSource
    {
        private readonly string mbtilefilepath;
 
        /// <summary>
        /// Initializes a new instance of the MyMapSource class.
        /// </summary>
        public MbTileSource(string mbtilefilepath, int minZoom, int maxZoom)
              : base(minZoom, maxZoom, 256, 256)
        {
            this.mbtilefilepath = mbtilefilepath;
        }
 
        /// <summary>
        /// Initialize provider.
        /// </summary>
        public override void Initialize()
        {
            // Raise provider initialized event.
            this.RaiseIntializeCompleted();
        }
        /// <summary>
        /// Gets the image URI.
        /// </summary>
        /// <param name="tileLevel">Tile level.</param>
        /// <param name="tilePositionX">Tile X.</param>
        /// <param name="tilePositionY">Tile Y.</param>
        /// <returns>URI of image.</returns>
        protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            return null;
        }
        protected override Stream GetCachedTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            var zoomLevel = this.ConvertTileToZoomLevel(tileLevel);
             
            try
            {
                using (var conn = new SQLiteConnection(String.Format("Data Source={0};Version=3;", this.mbtilefilepath)))
                {
                    conn.Open();
                    var sqlquery = String.Format("SELECT tile_data FROM tiles WHERE tile_column = {0} and tile_row = {1} and zoom_level = {2};", tilePositionX, tilePositionY, zoomLevel);
                    Debug.WriteLine(sqlquery);
                    using (var cmd = new SQLiteCommand() { Connection = conn, CommandText = sqlquery })
                    {
                        var reader = cmd.ExecuteReader();
                        if (reader.Read())
                        {
                            var bytes = reader["tile_data"] as byte[];
                            if (bytes != null)
                            {
                                return new MemoryStream(bytes);
                            }
                        }
                    }
                }
            }
            catch
            {
                return null;
            }
 
            return null;
        }
 
         
    }
}

This works and reads the files from the mbtiles (sqlite underneath the mbtiles spec) but the map is requesting the wrong tiles and I cannot see why. My understanding is:

1) Radmap is requesting tiles in a TMS format

2) MbTiles are stored in a TMS format

So the XYZ values passed into GetCachedTile(int tileLevel, int tilePositionX, int tilePositionY) should be the same I use in my sqlite query. Things I have checked:

1) I wondered if my mbtiles files was actually using OSMs style XYZ and tried the code to flip the Y value, this still gives incorrect tile values

2) I checked my mbtile file with https://viswaug.wordpress.com/2011/06/28/mbtilesviewer/ and it works fine

 So I can only assume that Radmap and mbtiles are using a different format or different projection hence the issues lining the two up. Can anyone help?

brian
Top achievements
Rank 1
 answered on 04 Mar 2016
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?