Search Results

Search found 12 results on 1 pages for 'customcontrols'.

Page 1/1 | 1 

  • Multiple Control Templates for a custom control in Silverlight

    - by Tada
    I am creating a custom control. The contents of the control will differ a lot when in different visual states. Can I to achieve the above, apply different control templates to the same custom control? That is define more than one control template for a custom control? If not, any clues as to how I can do this, without have as many custom/user controls as there are states?

    Read the article

  • How to assign Image Uri in a custom Control.

    - by Subhen
    Hi, I want to place an image inside my custom control , so my generic.xaml looks like below: <Style TargetType="local:generic"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:generic"> <Grid Background="{TemplateBinding Background}"> <Rectangle> <Rectangle.Fill> <SolidColorBrush x:Name="BackgroundBrush" Opacity="0" /> </Rectangle.Fill> </Rectangle> <TextBlock Text="{TemplateBinding Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}"/> <Image Source="{TemplateBinding Source}" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> My Codebehind is as follows: public class Generic : Control { public static DependencyProperty ImageUri = DependencyProperty.Register("Source", typeof(Uri), typeof(generic), new PropertyMetadata("")); public Uri Source { get { return (Uri)GetValue(generic.ImageUri); } set { SetValue(generic.ImageUri, value); } } public generic() { this.DefaultStyleKey = typeof(generic); } } Apllication is compiling fine but while I am trying to run it throws the following exception : $exception {System.Windows.Markup.XamlParseException: System.TypeInitializationException: The type initializer for 'testCstmCntrl.themes.generic' threw an exception. ---> System.ArgumentException: Default value type does not match type of property. Thanks, Subhen

    Read the article

  • Giving event control back to xaml/callee to access check/uncheck

    - by dovholuk
    Hi All, I've scoured the Internet but my search-foo must not work if it's out there cause I just can't find the proper search terms to get me the answer I am looking for. So I turn to the experts here as a last resort to point me in the right direction. What I'm trying to do is create a composite control of a text box and a list box but I want to allow the control consumer to decide what to do when say the checkbox is checked/unchecked and I just can't figure it out... Maybe i'm going about it all wrong. What I've done thus far is to: create a custom control that extends ListBox expose a custom DP named "Text" (for the Text box but it's not the important part) craft the generic.xaml so that the list items have a default ItemTemplate/DataTemplate inside the DataTemplate I'm trying to set the "Checked" or "Unchecked" events expose 'wrapper' events as DPs in the custom control that would get 'set' via the template when instatiated As soon as I try something like the following (inside generic.xaml): <DataTemplate> <...> <CheckBox Checked="{TemplateBinding MyCheckedDP}"/> <...> </DataTemplate> I get runtime exceptions, the designer - vs2010 - pukes out a LONG list of errors that are all very similar and nothing I do can make it work. I went so far as to try using the VisualTreeHelper but no magic combination I could find would work nor would it allow me to traverse the tree because when the OnApplyTemplate method fires the listbox items don't exist yet and aren't in the tree. So hopefully this all makes sense but if not please let me know and I'll edit the post for clarifications. Thanks to all for any pointers or thoughts... Like I said maybe I'm heading about it in the wrong way from the start... EDIT (Request for xaml) generic.xaml datatemplate: <DataTemplate > <StackPanel Orientation="Horizontal" > <local:FilterCheckbox x:Name="chk"> <TextBlock Text="{Binding Path=Display}" /> </local:FilterCheckbox> </StackPanel> </DataTemplate> usercontrol.xaml (invocation of custom control) <local:MyControl FancyName="This is the fancy name" ItemChecked="DoThisWhenACheckboxIsChecked" <-- this is where the consumer "ties" to the checkbox events ItemsSource="{Binding Source={StaticResource someDataSource}}" />

    Read the article

  • Custom control doesn't fire validation

    - by Ed Woodcock
    I've written a custom ASP.net control that descends from LinkButton and overrides the Render() method. I'm using it to replace ImageButtons in the site I'm working on so we don't have to have an image for each button. This control works fine, does the required post-backs etc., however it doesn't fire the validators in its validation group. This is obviously an issue. The code for the control is (condensed) as follows: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public class CustomButton : LinkButton { public string SpanCssClass { get; set; } protected override void Render(HtmlTextWriter writer) { if (!Visible) { return; } writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID); writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID); writer.AddAttribute(HtmlTextWriterAttribute.Class, CssClass); string postback = string.IsNullOrEmpty(OnClientClick) ? "javascript:__doPostBack('" + UniqueID + "','');" : OnClientClick; writer.AddAttribute(HtmlTextWriterAttribute.Href, postback); writer.RenderBeginTag(HtmlTextWriterTag.A); writer.AddAttribute(HtmlTextWriterAttribute.Class, SpanCssClass); writer.RenderBeginTag(HtmlTextWriterTag.Span); writer.Write(Text); writer.RenderEndTag(); writer.RenderEndTag(); } } Does anyone know why this would not be causing the validators to fire? I was under the impression that leaving all the other methods in LinkButton un-overridden would leave all the other functionality the same!

    Read the article

  • How to use a control like the one in Visual Studio's Class Details window

    - by Chapso
    There is a control in Visual Studio's Class Details window (accessed via Class Diagram) which combines a ListView with a TreeView. The result looks something like this: TreeViewNode1 Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 TreeViewNode2 Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 All of the TreeView Nodes are collapsable so that you can view only the nodes you want to. I am looking to implement this, but it doesn't seem to be a .net control. Does anyone know of a control which already exists that allows this? It has to be free (as in beer).

    Read the article

  • Custom button template in wpf

    - by Archana R
    Hello, I want to create a simple button template with an image and text inside it. But i want to keep the System button's look and feel. Can anyone tell me step by step how to create it? P.S. : I have already tried it with CustomControl in wpf and BasedOn property.

    Read the article

  • BrowserField or CustomControls? What is the best to use when submitting and fetching data from web?

    - by SIA
    Hi Everybody, I am unable to decide whether what to use for my blackberry application. I am developing an application for Blackberry Device. This application send and recieves data from website. Thats the only functionality. I wanted to know what the best approach to go with. Shall i use BrowserField and display html in the application?? OR Shall i develop the custom controls and update the UI with the data fetched from the web?? Please Suggest, advice. thanks SIA

    Read the article

  • Custom Control in ASP.NET C#

    - by Gal V
    Hello all, I created a simple custom control that only inherits from the Literal control, and doesn't have any extensions yet, code is empty. Namespace: CustomControls Class name: Literal : System.Web.UI.WebControls.Literal Next thing I do is registering this control in the aspx page as following: <%@ Register TagPrefix="web" Namespace="CustomControls" % (I read in few tutorials that this is one of the ways to register it, besides web.config etc.) After all, no intellisence for me, and worse- I get a parse error 'unknown server tag: web' when I try to run the page with the control in it. I used 'create new project' and not new website, in case this info is needed. What could be my problem? Thanks in advance.

    Read the article

  • ASP.NET GridView second header row to span main header row

    - by Dana Robinson
    I have an ASP.NET GridView which has columns that look like this: | Foo | Bar | Total1 | Total2 | Total3 | Is it possible to create a header on two rows that looks like this? | | Totals | | Foo | Bar | 1 | 2 | 3 | The data in each row will remain unchanged as this is just to pretty up the header and decrease the horizontal space that the grid takes up. The entire GridView is sortable in case that matters. I don't intend for the added "Totals" spanning column to have any sort functionality. Edit: Based on one of the articles given below, I created a class which inherits from GridView and adds the second header row in. namespace CustomControls { public class TwoHeadedGridView : GridView { protected Table InnerTable { get { if (this.HasControls()) { return (Table)this.Controls[0]; } return null; } } protected override void OnDataBound(EventArgs e) { base.OnDataBound(e); this.CreateSecondHeader(); } private void CreateSecondHeader() { GridViewRow row = new GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal); TableCell left = new TableHeaderCell(); left.ColumnSpan = 3; row.Cells.Add(left); TableCell totals = new TableHeaderCell(); totals.ColumnSpan = this.Columns.Count - 3; totals.Text = "Totals"; row.Cells.Add(totals); this.InnerTable.Rows.AddAt(0, row); } } } In case you are new to ASP.NET like I am, I should also point out that you need to: 1) Register your class by adding a line like this to your web form: <%@ Register TagPrefix="foo" NameSpace="CustomControls" Assembly="__code"%> 2) Change asp:GridView in your previous markup to foo:TwoHeadedGridView. Don't forget the closing tag. Another edit: You can also do this without creating a custom class. Simply add an event handler for the DataBound event of your grid like this: protected void gvOrganisms_DataBound(object sender, EventArgs e) { GridView grid = sender as GridView; if (grid != null) { GridViewRow row = new GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal); TableCell left = new TableHeaderCell(); left.ColumnSpan = 3; row.Cells.Add(left); TableCell totals = new TableHeaderCell(); totals.ColumnSpan = grid.Columns.Count - 3; totals.Text = "Totals"; row.Cells.Add(totals); Table t = grid.Controls[0] as Table; if (t != null) { t.Rows.AddAt(0, row); } } } The advantage of the custom control is that you can see the extra header row on the design view of your web form. The event handler method is a bit simpler, though.

    Read the article

  • Custom Control with Localization Support in WP7

    - by Ponmalar
    I have created the DateTimePicker control. Now i want to add localization Support with this. I have followed the below steps. Created CustomControls.de-DE.resx inside the ResourceFolder. added some commonly used strings in that resx file changed the access modifier to Public added <SupportedCulture>de-DE;</SupportedCulture> in the csproj file. set System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE"); in sample.cs file before IntializeComponent(). my DateTimevalue was " 2 Day(s): 3 Hr (s): 5 Min(s) : 32 Sec (s) Getting only default language that is english. What i did wrong? Please help me anyone. Is anything i missed?

    Read the article

  • MVVM Binding Selected RadOutlookBarItem

    - by Christian
    Imagine: [RadOutlookBarItem1] [RadOutlookBarItem2] [RadOutlookBar] [CONTENCONTROL] What i want to achieve is: User selects one of the RadOutlookBarItem's. Item's tag is bound like: Tag="{Binding SelectedControl, Mode=TwoWay}" MVVM Property public string SelectedControl { get { return _showControl; } set { _showControl = value; OnNotifyPropertyChanged("ShowControl"); } } ContentControl has multiple CustomControls and Visibility of those is bound like: <UserControl.Resources> <Converters:BoolVisibilityConverter x:Key="BoolViz"/> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <Views:ViewDocumentSearchControl Visibility="{Binding SelectedControl, Converter={StaticResource BoolViz}, ConverterParameter='viewDocumentSearchControl'}"/> <Views:ViewStartControl Visibility="{Binding SelectedControl, Converter={StaticResource BoolViz}, ConverterParameter='viewStartControl'}"/> </Grid> Converter: public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { // here comes the logic part... should return Visibility.Collapsed : Visibility.Visible based on 'object value' value System.Diagnostics.Debugger.Break(); return Visibility.Collapsed; } now, logically the object value is always set to null. So here's it comes to my question: How can i put a value into the SelectedControl Variable for the RadOutlookBarItem's Tag. I mean something like Tag="{Binding SelectedControl, Mode=TwoWay, VALUE='i.e.ControlName'"} So that i can decide, using the Convert Method, whether a specific Control's visibility is either set to collapsed or visible? help's appreciated Christian

    Read the article

  • CodePlex Daily Summary for Monday, November 05, 2012

    CodePlex Daily Summary for Monday, November 05, 2012Popular ReleasesCatel ReSharper plugin: Catel.Resharper 1.3 RC 1: (+) Added support for R# 7.1 (+) Added support to Catel 3.4 for to convert auto properties into catel properties from ModelBase. (*) PropertyConverter now generates a the members name (property and notification method) to avoid the usage of existing member name. (x) Fixed reference to Actions.xml resource file.Dyanamic Reports (RDLC) - SharePoint 2010 Visual WebPart: Initial Release: This is a Initial Release.HTML Renderer: HTML Renderer 1.0.0.0 (3): Major performance improvement (http://theartofdev.wordpress.com/2012/10/25/how-i-optimized-html-renderer-and-fell-in-love-with-vs-profiler/) Minor fixes raised in issue tracker and discussions.ZXMAK2: Version 2.7.0.1: fix Spectrum+3 ULA timing if Direct3D is not available, draw warning on black background add Keyboard Help window fix kempston mouse (swap left/right buttons) add Pentagon 1024 memory module add shadow rom support for Pentagon 512/1024 fix to avoid NMI conflict between memory/BDI (Scorpion, Pentagon 512/1024) project structure and namespace refactoring NOTE: this version uses new device namespaces, so if you have VMZ file from previous version, please delete it!CodeGen Code Generator: CodeGen 4.2.2: IMPORTANT: This release replaces the previous 4.2.1 release from 28th October 2012, which has been removed. There was an error in the setup program for 4.2.1 which caused some dependent assemblies (for example the Synergy .NET runtime and other Synergy .NET assemblies) to be distributed as part of the CodeGen installation. This can cause problems when attempting to upgrade to later versions of Synergy. IT IS VERY IMPORTANT THAT ALL 4.2.1 INSTALLATIONS BE UNINSTALLED AND UPGRADED TO 4.2.2 AS ...ProDinner - ASP.NET MVC Sample (EF4.4, N-Tier, jQuery): 8: update to ASP.net MVC Awesome 3.0 udpate to EntityFramework 4.4 update to MVC 4 added dinners grid on homepageASP.net MVC Awesome - jQuery Ajax Helpers: 3.0: added Grid helper added XML Documentation added textbox helper added Client Side API for AjaxList removed .SearchButton from AjaxList AjaxForm and Confirm helpers have been merged into the Form helper optimized html output for AjaxDropdown, AjaxList, Autocomplete works on MVC 3 and 4BlogEngine.NET: BlogEngine.NET 2.7: Cheap ASP.NET Hosting - $4.95/Month - Click Here!! Click Here for More Info Cheap ASP.NET Hosting - $4.95/Month - Click Here! If you want to set up and start using BlogEngine.NET right away, you should download the Web project. If you want to extend or modify BlogEngine.NET, you should download the source code. If you are upgrading from a previous version of BlogEngine.NET, please take a look at the Upgrading to BlogEngine.NET 2.7 instructions. If you looking for Web Application Project, ...Launchbar: Launchbar 4.2.2.0: This release is the first step in cleaning up the code and using all the latest features of .NET 4.5 Changes 4.2.2 (2012-11-02) Improved handling of left clicks 4.1.0 (2012-10-17) Removed tray icon Assembly renamed and signed with strong name Note When you upgrade, Launchbar will start with the default settings. You can import your previous settings by following these steps: Run Launchbar and just save the settings without configuring anything Shutdown Launchbar Go to the folder %LOCA...CommonLibrary.NET: CommonLibrary.NET 0.9.8.8: Releases notes for FluentScript located at http://fluentscript.codeplex.com/wikipage?title=Release%20Notes&referringTitle=Documentation Fluentscript - 0.9.8.8 - Final ReleaseApplication: FluentScript Version: 0.9.8.8 Build: 0.9.8.8 Changeset: 77368 ( CommonLibrary.NET ) Release date: November 2nd, 2012 Binaries: CommonLibrary.dll Namespace: ComLib.Lang Project site: http://fluentscript.codeplex.com/ Download: http://commonlibrarynet.codeplex.com/releases/view/90426 Source code: http://common...Mouse Jiggler: MouseJiggle-1.3: This adds the much-requested minimize-to-tray feature to Mouse Jiggler.Piwik for Microsoft Silverlight Analytics Framework: WP7 and WP8: First release with basic Piwik support. Supported Systems: WP7 and WP8PCAPMerger: 2.1.0.0: Archive contains three folders: x86 - 32-bit version of application x64 - 64-bit version of application test - two testing PCAP files to be merged (both contain scrambled order of packets)Umbraco CMS: Umbraco 4.10.0 Release Candidate: This is a Release Candidate, which means that if we do not find any major issues in the next week, we will release this version as the final release of 4.10.0 on November 9th, 2012. The documentation for the MVC bits still lives in the Github version of the docs for now and will be updated on our.umbraco.org with the final release of 4.10.0. Browse the documentation here: https://github.com/umbraco/Umbraco4Docs/tree/4.8.0/Documentation/Reference/Mvc If you want to do only MVC then make sur...Skype Auto Recorder: SkypeAutoRecorder 1.3.4: New icon and images. Reworked settings window. Implemented high-quality sound encoding. Implemented a possibility to produce stereo records. Added buttons with system-wide hot keys for manual starting and canceling of recording. Added buttons for opening folder with records. Added Help button. Fixed an issue when recording is continuing after call end. Fixed an issue when recording doesn't start. Fixed several bugs and improved stability. Major refactoring and optimization...Python Tools for Visual Studio: Python Tools for Visual Studio 1.5: We’re pleased to announce the release of Python Tools for Visual Studio 1.5 RTM. Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python language. PTVS supports a broad range of features including CPython/IronPython, Edit/Intellisense/Debug/Profile, Cloud, HPC, IPython, etc. support. For a quick overview of the general IDE experience, please watch this video There are a number of exciting improvement in this release comp...AssaultCube Reloaded: 2.5.5: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to package for those OSes. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Changelog: Fixed potential bot bugs: Map change, OpenAL...DirectX Tool Kit: October 30, 2012 (add WP8 support): October 30, 2012 Added project files for Windows Phone 8MCEBuddy 2.x: MCEBuddy 2.3.6: Changelog for 2.3.6 (32bit and 64bit) 1. Fixed a bug in multichannel audio conversion failure. AAC does not support 6 channel audio, MCEBuddy now checks for it and force the output to 2 channel if AAC codec is specified 2. Fixed a bug in Original Broadcast Date and Time. Original Broadcast Date and Time is reported in UTC timezone in WTV metadata. TVDB and MovieDB dates are reported in network timezone. It is assumed the video is recorded and converted on the same machine, i.e. local timezone...MVVM Light Toolkit: MVVM Light Toolkit V4.1 for Visual Studio 2012: This version only supports Visual Studio 2012 (and all Express editions too). If you use Visual Studio 2010, please stay tuned, we will publish an update in a few days with support for VS10. V4.1 supports: Windows Phone 8 Windows 8 (Windows RT) Silverlight 5 Silverlight 4 WPF 4.5 WPF 4 WPF 3.5 And the following development environments: Visual Studio 2012 (Pro, Premium, Ultimate) Visual Studio 2012 Express for Windows 8 Visual Studio 2012 Express for Windows Phone 8 Visual...New Projects3dTalk: Web 2.0 site for 3d projection mapping artists, to have a forum for showing work, getting advice or comments, and giving details of forthcoming shows/exhibition8media: a student project for Windows 8ActiveWorlds Managed Wrapper: HeyAsyncLoggers: AsyncLoggers strives to provide high-quality asynchronous wrappers for all well-known logging frameworks.CapsBeep: CapsBeep is a Windows utility application that causes an audible beep and a notification to appear whenever a key is pressed while the Caps Lock is active.CUDA Tuning with CUDAfy: A step-by-step guide to tuning performance of a CUDA- and CUDAfy-enabled GPU algorithm, using a brute-force Travelling Salesman algorithm as example.DDarkSEngine: New 2D game engine for .netFoxyXLS: Visual FoxPro class to geneate pure XLS files using the BIFF3 file format.JsApi: The purpose of this project is to demonstrate aspects of both the DialectSoftware.Web.UI.CustomControls and the DialectSoftware.Web.JsAPI LF Spec: Add simple test extensions to your MS Test projects for BDD-style unit tests.Liubaobao Website Starter Kit: When it comes to developing a new website - big or small, we all need something to start with. We are putting together a bunch of frequently used system parts.metropress: A feature-rich and easy to customize framework for developer/designer who want to turn any wordpress site into Windows 8 AppMobile Device: Include this in your .NET applications to allow them to easily get information from a connected iDevice.Mouse Trapper: Mouse Trapper is a program that will keep your mouse pointer inside one display, unless the chosen key is being pressed.My WCF Project: Learning projectNetworkFileWatcher: Watch changes to Files and Folders on a remote computer using NetworkFileWatcher. Overcomes the network-path limitation of System.IO.FileSystemWatcher.Quentin: Blog de QuentinQuickbooks Repair Pro: QuickBooks Repair ProSAIN: SAIN es un sistema administrativo integral basado en web que permite la administración de pequeños negocios.SQLCE with Windows Phone 7.1: This project is create on Initial understanding of SQL CE with windows phone. You will get more useful code with this codeplex link in fututre. SSDD Campero: kikhjuiojolipompmlkmlkmTileTool: Work in progress 2D tile based editor.Time Limiter: Set of Windows services used to limit times per day and per session of computer users. Meant for child computer use control. C# WCF Windows Services WMI.Window Manager: Position windows easilyYet Another Regex Tester: Write a regular expression (regex) and test it on real text.

    Read the article

1