Search Results

Search found 322 results on 13 pages for 'fontsize'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • Inserting a Variable String into the javascript prototype expression

    - by webzide
    Dear experts, Pardon me for giving you a confusing title on this problem. I'm really confused and i don't know how to put it in other words. So here is what I what to accomplish. I am making a Custom Javascript Object to store data. I have automated this process and inserted each instance of the object into an array. I am making a loop statement to invoke the unique property value of each instance of the object. When I want to use an expression, the property name of the object would be variable since i don't know which one it is. Basically I need to incorporate a string value into the prototype expression. e.g document.getElementById('text').style."fontsize"=value; since I cannot do this directly, i thought possibly I could use the eval function: eval('document.getElementById("text").style.' + buttons[i].cssvalue + '="39px";'); but this still doesn't work. Can this be fixed or ss there an alternative way to accomplish this? If there are some unclear stuff, please point out and I will try to elaborate. Thanks in advance.

    Read the article

  • Photo gallery not open in titanium 1.0

    - by user291247
    Hello, I am developing new app. using titanium 1.0 In that I am opening phtogallery in new window but I am not able to open it why this was happened? Code to open photogallery in app.js Titanium.App.addEventListener('recordvideo', function(e) { win1.close(); var w = Titanium.UI.createWindow({ backgroundColor:'#336699', title:'Modal Window', barColor:'black', url:'xhr_testfileupload.js' }); w.open({animated:true}); }); xhr_testfileupload.js code: var win = Titanium.UI.currentWindow; var ind=Titanium.UI.createProgressBar({ width:200, height:50, min:0, max:1, value:0, style:Titanium.UI.iPhone.ProgressBarStyle.PLAIN, top:10, message:'Uploading Image', font:{fontSize:12, fontWeight:'bold'}, color:'#888' }); win.add(ind); ind.show(); Titanium.Media.openPhotoGallery({ success:function(event) { Ti.API.info("success! event: " + JSON.stringify(event)); var image = event.media; var xhr = Titanium.Network.createHTTPClient(); xhr.onerror = function(e) { Ti.API.info('IN ERROR ' + e.error); }; xhr.onload = function() { Ti.API.info('IN ONLOAD ' + this.status + ' readyState ' + this.readyState); }; xhr.onsendstream = function(e) { ind.value = e.progress ; Ti.API.info('ONSENDSTREAM - PROGRESS: ' + e.progress); } // open the client xhr.open('POST','https://twitpic.com/api/uploadAndPost'); // send the data xhr.send({media:image,username:'fgsandford1000',password:'sanford1000',message:'check me out'}); }, cancel:function() { }, error:function(error) { }, allowImageEditing:true, });

    Read the article

  • Chain of DataBinding

    - by Neir0
    Hello I am trying to do follow DataBinding Property -> DependencyProperty -> Property But i have trouble. For example, We have simple class with two properties implements INotifyPropertyChanged: public class MyClass : INotifyPropertyChanged { private string _num1; public string Num1 { get { return _num1; } set { _num1 = value; OnPropertyChanged("Num1"); } } private string _num2; public string Num2 { get { return _num2; } set { _num2 = value; OnPropertyChanged("Num2"); } } public event PropertyChangedEventHandler PropertyChanged; public void OnPropertyChanged(string e) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(e)); } } And TextBlock declared in xaml: <TextBlock Name="tb" FontSize="20" Foreground="Red" Text="qwerqwerwqer" /> Now lets trying to bind Num1 to tb.Text: private MyClass _myClass = new MyClass(); public MainWindow() { InitializeComponent(); Binding binding1 = new Binding("Num1") { Source = _myClass, Mode = BindingMode.OneWay }; Binding binding2 = new Binding("Num2") { Source = _myClass, Mode = BindingMode.TwoWay }; tb.SetBinding(TextBlock.TextProperty, binding1); //tb.SetBinding(TextBlock.TextProperty, binding2); var timer = new Timer(500) {Enabled = true,}; timer.Elapsed += (sender, args) => _myClass.Num1 += "a"; timer.Start(); } It works well. But if we uncomment this string tb.SetBinding(TextBlock.TextProperty, binding2); then TextBlock display nothing. DataBinding doesn't work! How can i to do what i want?

    Read the article

  • Prefix for element not bound

    - by Tim
    Hello! I am a newbie in Flex development and using Flash Builder 4 with SDK 4. Now I get the error that "the prefix "fx" for element "fx:Style" is not bound" in line number 4. I searched for it, and it has sth. to do with namespaces, but I can not solve it by myelf. I have the file called "UserStory.mxml" in the directory "components" to place it via the main.mxml onto the screen: <fx:Script> <![CDATA[ import components.UserStory; private function init():void { var userStory1:UserStory = new UserStory(); userStory1.x = 100; userStory1.y = 100; userStory1.userStoryText = "test"; this.addChild(userStory1); } ]]> </fx:Script> The file in which the error occurs in line no. 4: <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="150" styleName="userstory"> <fx:Style source="styles/styles.css"/> <fx:Text x="5" y="5" width="275" height="135" text="{userStoryText}" fontFamily="notes" fontSize="18"/> <mx:Script> ... </mx:Script> </mx:Canvas> Can someone tell me what's wrong? Thanks a lot in advance & Best Regards.

    Read the article

  • Extract <name> attribute from KML

    - by Ozaki
    I am using OpenLayers for a mapping service. In which I have several KML layers that are using KML feeds from server to populate data on the map. It currently plots: images / points / vector lines & shapes. But on these points it will not add a label with the value of the for the placemark in the KML. What I have currently tried is: ////////////////////KML Feed for * Layer// var surveylinelayer = new OpenLayers.Layer.Vector("First KML Layer", { projection: new OpenLayers.Projection("EPSG:4326"), strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: firstKMLURL, format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }) }), styleMap: new OpenLayers.StyleMap({ "default": KMLStyle }) }); then the Style as follows: var KMLStyle = new OpenLayers.Style({ //label: "${name}", // This method will display nothing fillOpacity: 1, pointRadius: 10, fontColor: "#7E3C1C", fontSize: "13px", fontFamily: "Courier New, monospace", fontWeight: "strong", labelXOffset: "0", labelYOffset: "-15" }, { //dynamic label context: { label: function(feature) { return "Feature Name: " + feature.attributes.name; // also displays nothing } } }); Example of the KML: <Placemark> <name>POI1</name> <Style> <LabelStyle> <color>ffffffff</color> </LabelStyle> </Style> <Point> <coordinates>0.000,0.000</coordinates> </Point> </Placemark> When debugging I just hit "feature is undefined" and am unsure why it would be undefined in this instance?

    Read the article

  • Flex datagrid headerColor style not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • MXML composite canvas component initialization error

    - by mkorpela
    I'm getting an odd error from my composite canvas component: An ActionScript error has occurred: Error: null at mx.core::Container/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2560] at -REMOVED THIS FOR STACK OVERFLOW-.view::EditableCanvas/initialize()[.../view/EditableCanvas .... It seems to be related to the fact that my composite component has a child and I'm trying to add one in the place I'm using the component. So how can I do this correctly? Component code looks like this (EditableCanvas.mxml): <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="{init()}"> <mx:Script> <![CDATA[ private var _editable:Boolean; public function set editable(edit:Boolean):void { _editable = edit; } private function init():void { if(_editable){ addEventListener(MouseEvent.MOUSE_OVER, showEdit); addEventListener(MouseEvent.MOUSE_OUT, hideEdit); } } private function showEdit(event:Event):void { editTextImage.visible = true; } private function hideEdit(event:Event):void { editTextImage.visible = false; } ]]> </mx:Script> <mx:Image id="editTextImage" source="@Embed('/../assets/icons/small/process.png')" click="{dispatchEvent(EditPoiEvent.text())}" visible="false"/> </mx:Canvas> The code that is using the code looks like this: <view:EditableCanvas width="290" height="120" backgroundColor="#FFFFFF" horizontalScrollPolicy="off" borderStyle="solid" cornerRadius="3" editable="{_editable}"> <mx:Text id="textContentBox" width="270" fontFamily="nautics" fontSize="12" text="{_text}"/> </view:EditableCanvas>

    Read the article

  • WPF Browser is there, but invisible.

    - by Adam Crossland
    I am attempting to use the Browser control in a very simple WPF application, and it appears that while the browser is loading the page that I requested (I can mouseover images and see the ALT tags), I can't actually see anything else: Here is the XAML for the app: <Window x:Class="SmokeyBox2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="SmokeyBox" Height="120" Width="510" ShowInTaskbar="False" SizeToContent="WidthAndHeight" WindowStyle="None" AllowsTransparency="True" MouseLeftButtonDown="Window_MouseLeftButtonDown"> <Border Background="#50FFFFFF" CornerRadius="5" BorderThickness="2,0,2,2" Padding="5 1 5 5"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition> </Grid.ColumnDefinitions> <Label Grid.Row="0" Grid.Column="0" Background="Transparent" Content="SmokeyBox" MouseLeftButtonDown="Label_MouseLeftButtonDown" /> <TextBox Grid.Row="1" Grid.Column="0" Name="searchText" Width="450" FontFamily="Arial" Foreground="DarkGray" Background="Transparent" FontSize="20" MouseLeftButtonDown="searchText_MouseLeftButtonDown" BorderBrush="Transparent" /> <Expander Grid.Row="1" Grid.Column="1" Padding="2 3 0 0 " Expanded="Expander_Expanded" Collapsed="Expander_Collapsed" /> <WebBrowser Grid.Row="2" Grid.Column="0" x:Name="browser" Visibility="Visible" Width="480" Height="480" Margin="2 2 2 2" ></WebBrowser> </Grid> </Border> </Window> So can anyone help me figure out why the browser isn't showing the Yahoo! home page like I asked it to? And while I am at it, I'm going to own up to the fact that this is my first WPF app, and I'd love to hear any general pointers on how to get rid of general noobie badness in my XAML. Thanks.

    Read the article

  • Silverlight databinding error

    - by Petezah
    I found an example online that explains how to perform databinding to a ListBox control using LINQ in WPF. The example works fine but when I replicate the same code in Silverlight it doesn't work. Is there a fundamental difference between Silverlight and WPF that I'm not aware of? Here is an Example of the XAML: <ListBox x:Name="listBox1"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}" FontSize="18"/> <TextBlock Text="{Binding Role}" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> Here is an example of my code behind: private void UserControl_Loaded(object sender, RoutedEventArgs e) { string[] names = new string[] { "Captain Avatar", "Derek Wildstar", "Queen Starsha" }; string[] roles = new string[] { "Hero", "Captain", "Queen of Iscandar" }; listBox1.ItemSource = from n in names from r in roles select new { Name = n, Role = r} }

    Read the article

  • .NET Framework 4 in WPF not showing bitmap effect

    - by Adrian
    I am having a problem using VS2010 and framework version 4 with bitmap effects. If I have the code below and run it in a WPF application using the .NET Framework 4 Client Profile, the bitmap effect does not appear. If I set the framework version to .NET Framework 3.5 Client Profile (and change no code), it runs as expected. At first, I thought it was a problem in my application, but I removed the code and put it in a separate standalone application and it behaves the same. Anyone else verify that the same problem happens? What is happening here? The version 4 framework in VS2010 just seems to ignore the bitmap effect. <Window.Resources> <Style x:Key="SectionHeaderTextBlockStyle" TargetType="{x:Type TextBlock}"> <Setter Property="FontFamily" Value="Segoe UI"/> <Setter Property="FontSize" Value="18"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Foreground" Value="LightGreen"/> <Setter Property="BitmapEffect"> <Setter.Value> <OuterGlowBitmapEffect GlowColor="Black" GlowSize="3" /> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid VerticalAlignment="Center" HorizontalAlignment="Center"> <TextBlock Text="Contact Details" Style="{DynamicResource SectionHeaderTextBlockStyle}"/> </Grid>

    Read the article

  • Jquery - custom countdown

    - by matthewsteiner
    So I found this countdown at http://davidwalsh.name/jquery-countdown-plugin, I altered it a little bit: jQuery.fn.countDown = function(settings,to) { settings = jQuery.extend({ duration: 1000, startNumber: $(this).text(), endNumber: 0, callBack: function() { } }, settings); return this.each(function() { //where do we start? if(!to && to != settings.endNumber) { to = settings.startNumber; } //set the countdown to the starting number $(this).text(to); //loopage $(this).animate({ 'fontSize': settings.endFontSize },settings.duration,'',function() { if(to > settings.endNumber + 1) { $(this).text(to - 1).countDown(settings,to - 1); } else { settings.callBack(this); } }); }); }; Then I have this code: $(document).ready(function(){ $('.countdown').countDown({ callBack: function(me){ $(me).text('THIS IS THE TEXT'); } }); }); I don't mind taking everything out of the "animate" loop; I'd prefer that since nothing needs to be animated. (I don't need the font size to change). So everything's working to a point. I have a span with class countdown and whatever is in it when the page is refreshed goes down second by second. However, I need it to be formatted in M:S format. So, my two questions: 1) What can I use instead of animate to take care of the loop yet maintain the callback 2) How (where in the code should I) can I play with the time format? Thanks.

    Read the article

  • How do I change the CellErrorStyle for an Xceed Datagrid?

    - by Bob
    So in the Xceed documentation there is a code example that does not work for me. It may be because my grid is bound to a DataGridCollectionView. The objects in the collection used by the datagridcollection are what implement IDataErrorInfo. The errors are showing up just fine. The problem is that they are using the default orange background for errors...I need a red border. Below is the XAML instantiation of my grid. I set the DataCell background property to red just so I could be sure I had access to the grid's properties... I do. I just can't find the way to identify the cell's w/ errors so I can style them. Thanks! <XceedDG:DataGridControl Grid.Row="1" Grid.ColumnSpan="5" ItemsSource="{Binding Path = ABGDataGridCollectionView, UpdateSourceTrigger=PropertyChanged}" Background="{x:Static Views:DataGridControlBackgroundBrushes.ElementalBlue}" IsDeleteCommandEnabled="True" FontSize="16" AutoCreateColumns="False" x:Name="EncounterDataGrid" AllowDrop="True"> <XceedDG:DataGridControl.View> <Views:TableView ColumnStretchMode="All" ShowRowSelectorPane="True" ColumnStretchMinWidth="100"> <Views:TableView.FixedHeaders> <DataTemplate> <XceedDG:InsertionRow Height="40"/> </DataTemplate> </Views:TableView.FixedHeaders> </Views:TableView> </XceedDG:DataGridControl.View> <!--Group Header formatting--> <XceedDG:DataGridControl.Resources> <Style TargetType="{x:Type XceedDG:GroupByControl}"> <Setter Property="Visibility" Value="Collapsed"/> </Style> <Style TargetType="{x:Type XceedDG:DataCell}"> <Setter Property="Background" Value="Red"/> </Style> </XceedDG:DataGridControl.Resources> ...

    Read the article

  • Flex: embedded fonts not being applied correctly in Label and DataGrid

    - by lje
    Folks, I am observing a problem with how an embedded font is applied to certain Flex components, namely mx:Label and mx:DataGrid. I have a CSS that declares three variations on an embedded font as follows: @font-face { src:url("buttons.swf"); font-family: "Arial"; } @font-face { src:url("buttons.swf"); font-family: "Arial"; font-weight: bold; } @font-face { src:url("buttons.swf"); font-family: "Arial"; font-style: italic; } And in the style declaration for Label and DataGrid, I have: Label { fontFamily: "Arial"; fontSize: 11; fontFamily: LucidaSans; } and DataGrid { fontFamily: "Arial"; height: 16; } (I've snipped some stuff from both style rules, so if you think there's something that may be causing a conflict I can certainly post the entire definition. It's mostly color, line and padding stuff for the DataGrid.) The problem that is for both Label and cells in the DataGrid the text is being rendered as sort of a times new roman font. The headers in the DataGrid are fine, just the text in the cells is wonky. All other components use the correct font as defined in the CSS/SWF. Any ideas why this is happening?

    Read the article

  • Help with animating an element in jQuery

    - by alex
    I have an unordered list with a few list elements. #tags { width: 300px; height: 300px; position: relative; border: 1px solid red; list-style: none none; } #tags li { position: absolute; background: gray; } I have also started writing a jQuery plugin to animate the list elements. So far, I place the list elements randomly in the parent container, and choose a random font size for the text. My next step (which I am a bit stuck on) is to animate the list elements... essentially, I want the list elements to do something like this Slide from left to right whilst getting slightly larger up to the middle and then dropping in size back to normal when it hits the right border. Then, it should do the same in reverse, however it should also set a negative 'z-index' and maybe fade in opacity a bit. The first bit I'm really stuck on, is how to determine if the element is near the middle, in a way that I can have a value that starts at 0.1 on the far left hand size and is 1 in the middle and then back to 0.1 on the far right hand size. Basically, I want them to appear as if they are going around in a faux 3D circle into the page. Then I could do something like this $(this).css({ fontSize: percentageTowardsMiddle * 14, }); Do you know how I could do this? Thanks

    Read the article

  • How do you align text so it is in the middle of a button in Silverlight?

    - by Roy
    Here is the current code I am using: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ButtonPrototype.MainPage" Width="640" Height="480"> <UserControl.Resources> <ControlTemplate x:Key="CellTemplate" TargetType="Button"> <Grid> <Border x:Name="CellBorderBrush" BorderBrush="Black" BorderThickness="1"> <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> </Grid> </ControlTemplate> <Style x:Key="CellStyle" TargetType="Button"> <Setter Property="Template" Value="{StaticResource CellTemplate}"></Setter> <Setter Property="Foreground" Value="Black"></Setter> <Setter Property="FontSize" Value="80"></Setter> <Setter Property="Width" Value="100"></Setter> <Setter Property="Height" Value="100"></Setter> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <Button Content="A" Style="{StaticResource CellStyle}"></Button> </Grid> </UserControl> The Horizontal aligning works but the verticalalignment doesn't do anything. Thanks for your help.

    Read the article

  • I can't set a border around my StackPanel. Any help?

    - by Sergio Tapia
    Here's my XAML code: <Window x:Class="CarFinder.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Search for cars in TuMomo" Height="480" Width="600"> <DockPanel Margin="8"> <Border CornerRadius="6" BorderBrush="Gray" Background="LightGray" BorderThickness="2" Padding="8"> <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Height="25"> <TextBlock FontSize="14" Padding="0 0 8 0"> Search: </TextBlock> <TextBox x:Name="txtSearchTerm" Width="400" /> <Image Source="/CarFinder;component/Images/Chrysanthemum.jpg" /> </StackPanel> </Border> <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Height="25"> </StackPanel> </DockPanel> </Window> The border is set around the entire window. And also, when I create another StackPanel it's added to the right of my previous StackPanel instead of being added under it. What's the reason for this?

    Read the article

  • Item rendered via a DataTemplate with any Background Brush renders selection coloring behind item.

    - by Mike L
    I have a ListBox which uses a DataTemplate to render databound items. The XAML for the datatemplate is as follows: <DataTemplate x:Key="NameResultTemplate"> <WrapPanel x:Name="PersonResultWrapper" Margin="0" Orientation="Vertical" Background="{Binding Converter={StaticResource NameResultToColor}, Mode=OneWay}" > <i:Interaction.Triggers> <i:EventTrigger EventName="MouseDown"> <cmd:EventToCommand x:Name="SelectPersonEventCommand" Command="{Binding Search.SelectedPersonCommand, Mode=OneWay, Source={StaticResource Locator}}" CommandParameter="{Binding Mode=OneWay}" /> </i:EventTrigger> </i:Interaction.Triggers> <TextBlock x:Name="txtPersonName" TextWrapping="Wrap" Margin="0" VerticalAlignment="Top" Text="{Binding PersonName}" FontSize="24" Foreground="Black" /> <TextBlock x:Name="txtAgencyName" TextWrapping="Wrap" Text="{Binding AgencyName}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0" FontStyle="Italic" Foreground="Black" /> <TextBlock x:Name="txtPIDORI" TextWrapping="Wrap" Text="{Binding PIDORI}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0" FontStyle="Italic" Foreground="Black" /> <TextBlock x:Name="txtDescriptors" TextWrapping="Wrap" Text="{Binding DisplayDescriptors}" Margin="0" VerticalAlignment="Top" Foreground="Black"/> <Separator Margin="0" Width="400" /> </WrapPanel> </DataTemplate> Note that there is a value converter called NameResultToColor which changes the background brush of the rendered WrapPanel to gradient brush depending on certain scenarios. All of this works as I'd expect, except when you click on any of the rendered ListBox items. When you click one, there is only the slightest sign of the selection coloring (the default bluish color). I can see a trace bit of it underneath my gradient-brushed item. If I reset the background brush to "no brush" then the selection rendering works properly. If I set the background brush to a solid color, it also fails to render as I'd expect. How can I get the selection coloring to be on top? What is trumping the selection rendering?

    Read the article

  • Strange Behaviour in DataGrid SilverLight 3 Control

    - by Asim Sajjad
    Here is the my Xaml Code. Here I have changed the Foreground of the cell depending on the current age of the person. <data:DataGridTemplateColumn Header="First Name" Width="150" MinWidth="150" CanUserReorder="False" SortMemberPath="FirstName"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate > <TextBlock Foreground ="{Binding Path=DateOfBirth,Mode=OneWay,Converter={StaticResource CellColor}}" Text="{Binding FirstName}" ToolTipService.ToolTip="{Binding FirstName}" FontFamily="Arial" FontSize="11" VerticalAlignment="Center" Margin="5,0,0,0" /> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> </data:DataGridTemplateColumn> <data:DataGridTextColumn Foreground ="{Binding Path=DateOfBirth,Mode=OneWay,Converter={StaticResource CellColor}}" Header="Last Name" Width="150" MinWidth="150" Binding="{Binding LastName}" CanUserSort="True" IsReadOnly="True" CanUserReorder="False"/> When I run the above code it return following Exception AG_E_PARSER_BAD_PROPERTY_VALU My question is that when I remove the Foreground converter from the DataGridTextColumn Column it runs fine As the Foreground converter is applied in the DataGridTemplateColumn Column which will not through excepction. But when I used same Converter to the DataGridTextColumn it throw execption why, can anyone know why is th is behaviour thanks in advance.

    Read the article

  • Flex datagrid headerColor style is not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • Why is a NullReferenceException thrown when a ToolStrip button is clicked twice with code in the `Click` event handler?

    - by Patrick
    I created a clean WindowsFormsApplication solution, added a ToolStrip to the main form, and placed one button on it. I've added also an OpenFileDialog, so that the Click event of the ToolStripButton looks like the following: private void toolStripButton1_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); } I didn't change any other properties or events. The funny thing is that when I double-click the ToolStripButton (the second click must be quite fast, before the dialog opens), then cancel both dialogs (or choose a file, it doesn't really matter) and then click in the client area of main form, a NullReferenceException crashes the application (error details attached at the end of the post). Please note that the Click event is implemented while DoubleClick is not. What's even more strange that when the OpenFileDialog is replaced by any user-implemented form, the ToolStripButton blocks from being clicked twice. I'm using VS2008 with .NET3.5. I didn't change many options in VS (only fontsize, workspace folder and line numbering). Does anyone know how to solve this? It is 100% replicable on my machine, is it on others too? One solution that I can think of is disabling the button before calling OpenFileDialog.ShowDialog() and then enabling the button back (but it's not nice). Any other ideas? And now the promised error details: System.NullReferenceException was unhandled Message="Object reference not set to an instance of an object." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.NativeWindow.WindowClass.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at WindowsFormsApplication1.Program.Main() w C:\Users\Marchewek\Desktop\Workspaces\VisualStudio\WindowsFormsApplication1\Program.cs:line 20 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:

    Read the article

  • MXML composite container initialization error

    - by mkorpela
    I'm getting an odd error from my composite canvas component: An ActionScript error has occurred: Error: null at mx.core::Container/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2560] at -REMOVED THIS FOR STACK OVERFLOW-.view::EditableCanvas/initialize()[.../view/EditableCanvas .... It seems to be related to the fact that my composite component has a child and I'm trying to add one in the place I'm using the component. So how can I do this correctly? Component code looks like this (EditableCanvas.mxml): <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <mx:Image id="editTextImage" source="@Embed('/../assets/icons/small/edit.png')"/> </mx:Canvas> The code that is using the code looks like this: <view:EditableCanvas width="290" height="120" backgroundColor="#FFFFFF" horizontalScrollPolicy="off" borderStyle="solid" cornerRadius="3"> <mx:Text id="textContentBox" width="270" fontFamily="nautics" fontSize="12" text="{_text}"/> </view:EditableCanvas>

    Read the article

  • State Animation on ListBox ItemTemplate

    - by Peanut
    I have a listbox which reads from Observable collection, and is ItemTemplate'ed: <DataTemplate x:Key="DataTemplate1"> <Grid x:Name="grid" Height="47.333" Width="577" Opacity="0.495"> <Image HorizontalAlignment="Left" Margin="10.668,8,0,8" Width="34" Source="{Binding ImageLocation}"/> <TextBlock Margin="56,8,172.334,8" TextWrapping="Wrap" Text="{Binding ApplicationName}" FontSize="21.333"/> <Grid x:Name="grid1" HorizontalAlignment="Right" Margin="0,10.003,-0.009,11.33" Width="26" Opacity="0" RenderTransformOrigin="0.5,0.5"> <Image HorizontalAlignment="Stretch" Margin="0" Source="image/downloads.png" Stretch="Fill" MouseDown="Image_MouseDown" /> </Grid> </Grid> </DataTemplate> <ListBox x:Name="searchlist" Margin="8" ItemTemplate="{DynamicResource DataTemplate1}" ItemsSource="{Binding SearchResults}" SelectionChanged="searchlist_SelectionChanged" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" /> In general, my question is "What is the easiest way to do Animation on Particular Items in this listbox As they are selected? Basically the image inside the "grid1" will be setting its opacity to 1, slowly. I would prefer to use states, but I do not know of any way to just tell blend and xaml to "When a selected item is changed, change the image opacity to 1 over a period of .3 seconds". Infact, I have been doing this in the .cs file using the VisualStateManager. Also, there is another issue. When the selected index is changed, we goto the CS file and look at SelectedItem. SelectedItem returns an instance of the Object in which it was bound to (The object inside the observable collection), and NOT an instance of the DataTemplate/ListItem etc. So how am I able to pull the correct image out of this list? State animation with VisualStateManager I can handle fine if its just normal things, but when it comes to generated listboxes' items, I'm lost. Thanks

    Read the article

  • Reduce unwanted noise

    - by Rajeev
    In the below code sometimes when microphone is not connected some noise is generated and the system just keeps on buzzing the same sound.Whats wrong with the code below and how to reduce the unwanted noise. Should i set myMic.setLoopBack(false) in the below code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="300" height="100" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import flash.net.NetStream; private var myMic:Microphone; private var recordingState:String = "idle"; private function init():void { myMic = Microphone.getMicrophone(); myMic.setSilenceLevel(0); myMic.rate = 44; myMic.gain = 100; myMic.setUseEchoSuppression(true); micLevel.visible = true; //Security.showSettings(SecurityPanel.MICROPHONE); myMic.setLoopBack(true); if (myMic != null) { myMic.setUseEchoSuppression(true); micLevel.setProgress(myMic.activityLevel, 100); addEventListener(Event.ENTER_FRAME, showMicLevel); //micLevel.setProgress(myMic.activityLevel, 100); } } private function showMicLevel(event:Event):void{ switch (recordingState){ case "idle" : micLevel.setProgress(myMic.activityLevel, 100); break; } } ]]> </mx:Script> <mx:ProgressBar x="0" y="36" mode="manual" id="micLevel" label="" labelPlacement="bottom" width="100" fontSize="10" fontWeight="normal"/> </mx:Application>

    Read the article

  • Master Detail same View binding controls

    - by pipelinecache
    Hi everyone, say I have a List View with ItemControls. And a Details part that shows the selected Item from List View. Both are in the same xaml page. I tried everything to accomplish it, but what do I miss? <!-- // List --> <ItemsControl ItemsSource="{Binding Path=Model, ElementName=SomeListViewControl, Mode=Default}" SnapsToDevicePixels="True" Focusable="False" IsTabStop="False"> <ItemsControl.ItemTemplate> <DataTemplate> <SomeListView:SomeListItemControl x:Name=listItem/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <!-- // Details --> <Label Content="Begindatum" FontSize="16" VerticalAlignment="Center" Grid.Row="1" Margin="2,0,0,0"/> <TextBox x:Name="Begindatum" Grid.Column="1" Grid.Row="1" Text="{Binding Path=BeginDate, ElementName=listItem,Converter={StaticResource DateTimeConverter}, ConverterParameter=dd-MM-yyyy}" IsEnabled="False" Style="{DynamicResource TextBoxStyle}" MaxLength="30"/> public event EventHandler<DataEventArgs<SomeEntity>> OnOpenSomething; public ObservableCollection<SomeEntity> Model { get { return (ObservableCollection<SomeEntity>)GetValue(ModelProperty); } set { Model.CollectionChanged -= new NotifyCollectionChangedEventHandler(Model_CollectionChanged); SetValue(ModelProperty, value); Model.CollectionChanged += new NotifyCollectionChangedEventHandler(Model_CollectionChanged); UpdateVisualState(); } } public static readonly DependencyProperty ModelProperty = DependencyProperty.Register("Model", typeof(ObservableCollection<SomeEntity>), typeof(SomeListView), new UIPropertyMetadata(new ObservableCollection<SomeEntity>(), new PropertyChangedCallback(ChangedModel))); private static void ChangedModel(DependencyObject source, DependencyPropertyChangedEventArgs e) { SomeListView someListView = source as SomeListView; if (someListView.Model == null) { return; } CollectionView cv = (CollectionView)CollectionViewSource.GetDefaultView(someListView.Model); } private void Model_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (Model == null) { return; } }

    Read the article

  • WPF Empty Row in ItemsControl Binding with ObservableCollection

    - by YoMo
    I have ItemsControl Binding with ObservableCollection, every think is oky excipt when ObservableCollection was empty the ItemsControl showing one empty row !! <ItemsControl Visibility="Visible" ItemsSource="{Binding ocItemsinInvoice,Mode=TwoWay}" x:Name="test" Margin="10,-32,0,207" Width="412" HorizontalAlignment="Left"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="1" VerticalAlignment="Top" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Button x:Name="btnOpenInvoice" Style="{StaticResource OpenInvoicesButton}" FontSize="12" Width="300" Height="60" Foreground="#ff252526"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Item.ItemName}" HorizontalAlignment="Center" VerticalAlignment="Center" /> </StackPanel> </Button> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> How can I remove it?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >