Search Results

Search found 23674 results on 947 pages for 'custom action'.

Page 13/947 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Custom button with property as StaticResource

    - by alin
    I am trying to achieve the following thing: use an svg image into a custom button. In order to do this I created a Custom button: public class MainButton : Button { static MainButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(MainButton), new FrameworkPropertyMetadata(typeof(MainButton))); } public string Text { get { return (string)GetValue(TextProperty); } set { SetValue(TextProperty, value); } } public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(MainButton), new UIPropertyMetadata("")); public object Image { get { return (object)GetValue(ImageProperty); } set { SetValue(ImageProperty, value); } } public static readonly DependencyProperty ImageProperty = DependencyProperty.Register("Image", typeof(object), typeof(MainButton), new UIPropertyMetadata("")); } I took a svg file, opened it in inkscape and saved it as xaml file. I opened Themes.xaml and added the created xaml image as a ControlTemplate And the button style is: Style TargetType="{x:Type local:MainButton}" <StackPanel Canvas.Top="12" Canvas.Left="0" Canvas.ZIndex="2" Width="80"> <ContentControl x:Name="Img" Template="{StaticResource Home}" /> </StackPanel> <StackPanel x:Name="spText" Canvas.Top="45" Canvas.Left="1" Canvas.ZIndex="1" Width="80"> <TextBlock x:Name="Txt" Text="{Binding Path=(local:MainButton.Text), RelativeSource ={RelativeSource FindAncestor, AncestorType ={x:Type Button}}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"/> </StackPanel> ... As you can see I have hardcoded the StaticResource name I want to be able to have a binding with property Image on this Template, something like So that I can set the Image property of the button with the name of the StaticResource I want. For example, having beside "Home" image, another one "Back" I would have two buttons in MainWindow declared like this: Any advice is kindly taken. Thank you for your time.

    Read the article

  • Custom Server to communicate with my software?

    - by Zachary Brown
    I am working on a major project that I need for work. I am working on a project that requires software validation. I would like this to be handled by a custom server I will write in Python, this server will be the "gateway" between the user and product activation. The software program will be purchased from other companies in volume licensing. So this is what I need the server to do: 1). The user clicks to activate their software. (easy, all is good so far) 2). The software gets the distributor's id from another online server. ( this is also easy, and already coded.) 3). Then, the software asks my custom server if the distributor is allowed to activate anymore copies of the software. 4). The server will then check ( an online encoded text file ) to see if the distributor can or can't. If they can, it will tell the software that registration can proceede, at which point the software will pass the software serial number to the server. I have done my best to explain what I am trying to accomplish, but if something is not quite sensible, please let me know. Thanks to all members of Stackoverflow.com for the help in the past, and those who will help me now. I am using Python 2.6 Win. XP Home Edition

    Read the article

  • How can I theme custom form(drupal 6.x)

    - by Andrew
    DRUPAL 6.X I have this custom form constructor inside my custom module which is invoke through ajax request. I’m attempting to theme this form with the template file reside in my theme directory. For that matter, I’ve registered my theme inside template.php file which reside in my theme folder. Here’s how this file looks – function my_theme() { return array( 'searchdb' => array( 'arguments' => array('form' => NULL), 'template' => 'searchform', ) ); } And the following is the excerpt of module code – function test_menu() { $my_form['searchdb'] = array( 'title' => 'Search db', 'page callback' => 'get_form', 'page arguments' => array(0), 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $my_form; } function get_form($formtype){ switch($formtype){ case 'searchdb' : echo drupal_get_form('searchdb'); break; } } function searchdb(){ $form['customer_name'] = array( '#type' => 'textfield', '#title' => t('Customer Name'), '#size' => 50, '#attributes' => array('class' => 'name-textbox'), ); return $form; } As you can imagine, this is not working at all. Just to test if my theme is even registered, I’ve also tested with theme function but, it’s not called. I've checked template file name and form-id(through the outputted html source) and everything seems ok. I would be glad if anyone could point me to the right direction.

    Read the article

  • Custom UIViewController is not responsive to device rotation

    - by Wayne Lo
    I have a custom UIViewController, which is the only subView of UIView. The UIViewController contains delegate function: (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } This function is called once when the application starts and is never called again when the device is rotated. I also notice that the willRotateToInterfaceOrientation function is never called. I pretty much commented out all the content in the UIViewController but it is still not responding to device rotation.

    Read the article

  • iPhone SDK / Facebook Connect: Using a custom login dialog

    - by boliva
    Exactly what the title says. Is it possible to use Facebook Connect (or any other means of FB integration) in a native iPhone app without resorting to the built in login dialog (which looks awful)? Something where I could create my own custom login screen asking for the facebook login username and password and then using the fbconnect native methods to validate that info and retrieve a valid session?

    Read the article

  • Wordpress, WP_Query with custom taxonomy and custom post type

    - by Chris
    This code gets 10 posts of all types that are linked to the term_name; global $wp_query; query_posts( array( "taxonomy_name" => "term_name", 'showposts' => 10 ) ); This code gets 10 posts of custom post type "message"; global $wp_query; query_posts( array( 'post_type' => 'message' 'showposts' => 10 ) ); This code however always ignores the post_type requirement but still selects all post types linked to the term_name; global $wp_query; query_posts( array( 'post_type' => 'message' , "taxonomy_name" => "term_name", 'showposts' => 10 ) ); I can't see how both can work individually but together they don't unless it might be a bug - any thoughts?

    Read the article

  • Insert custom TypeConverter on a property at runtime, from inside a custom UITypeEditor

    - by Pedery
    I've created a custom UITypeEditor. Can I possibly insert an attribute that also attaches a TypeConverter to my property from inside the UITypeEditor class? I've tried the following, but nothing happens, no matter how I twist and turn it: Attribute[] newAttributes = new Attribute[1]; newAttributes[0] = new TypeConverterAttribute(typeof(BooleanConverter)); Now, the above needs to have the following attached to it somehow: TypeDescriptor.AddAttributes(context.Instance.PROPERTYNAME, newAttributes); ...but first of all I don't know how to get to the property in question in a generic way, and all code I try just fails. Even if I try to assign the TypeConverter in this manner globally, it fails. (Setting it as an attribute on the property itself works though, just to rule out that the bug is in that part.)

    Read the article

  • C#: Insert custom TypeConverter on a property at runtime, from inside a custom UITypeEditor

    - by Pedery
    I've created a custom UITypeEditor. Can I possibly insert an attribute that also attaches a TypeConverter to my property from inside the UITypeEditor class? I've tried the following, but nothing happens, no matter how I twist and turn it: Attribute[] newAttributes = new Attribute[1]; newAttributes[0] = new TypeConverterAttribute(typeof(BooleanConverter)); Now, the above needs to have the following attached to it somehow: TypeDescriptor.AddAttributes(context.Instance.PROPERTYNAME, newAttributes); ...but first of all I don't know how to get to the property in question in a generic way, and all code I try just fails. Even if I try to assign the TypeConverter in this manner globally, it fails. (Setting it as an attribute on the property itself works though, just to rule out that the bug is in that part.)

    Read the article

  • Custom UITableViewCell rounded corners (grouped style)

    - by Urizen
    When creating a custom UITableViewCell I notice that it looks as expected in 'plain' style but that the corners of the cells are not rounded if the table view is displayed in 'grouped' style: i.e. the corners are square. I have searched but cannot find any real explanation of why this happens and, more importantly, how to remedy this effect.

    Read the article

  • Custom Tracking with Google Analytics

    - by matthewb
    I am trying to figure out how to use my google analytics account, and do custom tracking on certain links and such, but following the technical information on the help site on google isn't getting me anywhere. Has anyone done something like this? Point me in the right direction.

    Read the article

  • Custom Application Page does not recognize tagPrefix defined in custom web.config

    - by Hasan Khan
    I have a custom application page integrated in Centeral Administration. My application pages are placed in a subfolder in Template\Admin folder. I placed my own web.config in my subfolder and added tagPrefixes in the control section. However when I open my application page ASP.NET throws the exception that the tag SharePoint:InputFormTextBox was not recognized. What am I doing wrong? Or it doesn't work this way? What can i do to achieve this?

    Read the article

  • Can a custom WPF control implement the IsDefault property

    - by jpierson
    I have a custom button control that does not derive from Button. Is it possible for me to implement the equivalent of IsDefault so that the command associated with my control will be invoked. I was hoping that this was an attached property that I could add to any control but as far as I can tell it doesn't seem to be. Am I out of luck if my control does not derive from Button or is there at least a reasonable workaround?

    Read the article

  • custom format specifications in python

    - by anupam
    hi, in python, how can a custom format-specification be added, to a class ? for example, if i write a matrix class, i would like to define a '%M' (or some such) which would then dump the entire contents of the matrix... thank you kind regards anupam

    Read the article

  • Symfony - Custom under maintenance page

    - by Rui Gonçalves
    Hi there! I'm trying to add a custom page to my web application for the times I'm performing maintenance. I'm trying to test the referred page on my development environment but always appear the symfony page. I had already created a module with a proper action and template and also configured those on the settings.yml file. Can anyone give me some help? Thanks in advance, Best regards!

    Read the article

  • Kohana 3 - custom route

    - by pigfox
    I'm trying to create a custom route like:search/result/city/p1/state/p2/zip/p3/min/p4/max/p5/bed/p6/bath/p7/cats/p8/dogs/p9/parking/p10 Where search is the controller and result the action p1-p10 are variables.

    Read the article

  • Silverlight Custom Control in F# DefaultStyleKey

    - by akaphenom
    Wondering how to accomplish setting the Style xaml with the code in F#. Im a C# project the buld options allow you to mark it as a resource cusomt build command of: MSBuild:Compile I don't see it in the properties panel, so I tried to add it by hand to the project file myself... Any ideas? The application loads - the custom control has no output (but the code executes). Thanks

    Read the article

  • Android: Dinamically add custom checkboxes to a tableLayout

    - by fxi
    What should i do to use custom checkboxes if i add my checkboxes dinamically on my code? (on the java code not on the xml files). Im following this tutorial http://www.anddev.org/novice-tutorials-f8/tutorial-change-look-of-checkbox-t4553.html, but using it i cant achieve my goal. For example, i have a tableLayout and i want to add a checkbox for each new row i have. Thank you all.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >