expression

Making default control template editable in Expression blend

I created my own ContentCOntrol in XAML, e.x.: <ContentControl x:Class="server.ui.DiamondButton"> <ContentControl.Template> <ControlTemplate TargetType="src:DiamondButton"> <...> </ControlTemplate> </ContentControl.Template> </ContentControl> This sets the default template and generally works great....

get expression of method in Expression tree

i want to create the following query in expression trees: var test = from datarow in tempResults where datarow.Field<String>("ColumnName") == "Column" select datarow; How do i create the expression : datarow.Field("ColumnName")? i tried everything, i even got stuck on getting the MethodInfo of Fi...

Does anyone know how to translate LINQ Expression to NHibernate HQL statement?

Dear ladies and sirs. Does anyone know of an existing solution to translate a LINQ Expression to HQL statement? Thanks in advance to all the good samaritans out there. P.S. We already use Linq to NHibernate. However, it only works for select statements, whereas HQL is good for other statement kinds, like delete. So, Linq to NHibernat...

In a multitier application should a client be allowed to send its own linq expressions to the server?

The rationale: HQL and NH criteria are NHibernate specific constructs and as such they are server side DAL implementation details. I do not want them to "leak" to the client side. So, our client side provides LINQ expressions for the server to process. Seems legitimate to me, some, however, think otherwise and so I would like to know ...

Overriding grails.views.default.codec='html' config back to 'none'

If I leave grails.views.default.code='none' in the grails Config.groovy, it's up to me to HTML encode my expressions explicitly in the GSP files: ${myValue?.encodeAsHTML()}. If I set grails.views.default.codec='html" in the Config.groovy, then the HTML encoding happens automatically for every expression: ${myValue}. My question: If I s...

Silverlight Player doesn't play video smoothly

Hi all, I'm having a problem with silverlight player when playing a smoothstreaming video (ismv). When the camera is moving fast some parts of the movie appear distorted (horizontal blocks). It seams like some horizontal parts of the movie are milliseconds delayed. This strange effect does not occur if I open the ismv file using the win...

Expression Encoder - Limitations for file Dimension - min size of 64 * 64 and must be a multiple of 4?

I receive error messages when attempting to encode files in Expression Encoder when the file width or height is not a multiple of four, or is smaller than 64. I have been able to find very little in the documentation / web searches on this, and nothing that explains what settings may cause / alleviate these limitations. I assume it has...

Are Expression Blend design-time specific visuals possible?

I'm trying to design some UserControl classes in Blend 3. I want parts of them to be "collapsed" when created at runtime, but I want to be able to edit their component parts without fiddling with code every time I want to build. It works with sample datasources, as the following example illustrates. But it doesn't appear to work with ot...

C#: Strip Illegal Chars from a filename string.

Why won't this do anything, output is identical to input? I'm baffled!!! string name = ";;;'']][[ zion \\\[[[]]]" char[] invalidChars = System.IO.Path.GetInvalidPathChars(); string invalidString = Regex.Escape(new string(invalidChars)); string valid = Regex.Replace(name, "[" + invalidString + "]", ""); ...

Spring.NET Expression that References an Object Definition

I'm trying to reference another object I've defined in a Spring config file from within an expression. Specifically, I'm trying to populate a property with the value of an expression where I call a method and then a property on the object returned from that method. I've tried the following (names have been changed): <property name="Nu...

Linq expression subsonic 3.0.0.3

Hello, I want to 'build' a combined query for Subsonic 3.0.0.3, what is the best way for this? I tried; Expression<Func<Person, bool>> exp = p => true; Expression<Func<Person, bool>> fContinent = p => p.ContinentID == 1; Expression<Func<Person, bool>> fType = p => p.TypeID == 1; exp = Expression.Lambda<...

resultSet.Expression {System.Data.Linq.SqlClient.SqlProvider+OneTimeEnumerable (...)}

I'm having a compiled query after which I've stacked a non-compiled query via an IQueryable extension method. var resultSet = CompiledQueries.GetNewCustomers(datacontext).OrderBy(criteria.OrderExpression); When I put a breakpoint at a non-compiled query, I can usually see the SQL expression generated. However, when I put a breakpo...

C# .NET 3.5: What is Expression<> used for?

What exactly is Expression<> used for in C#? Are there any scenarios where you would instantiate Expression<>'s yourself as an object? If so, please give an example! Thank you! ...

Best and shortest way to evaluate mathematical expressions

I know there are many algorithms to evaluate expressions, for example By Recursive Descent Shunting-yard algorithm Reverse Polish notation But is there any way to evaluate any mathematical expression using C# .net reflection? or other modern .net technology? Thanks a lot ...

Microsoft Expression Blend (silverlight): repeating header?

Hi I'm using the new microsoft expression. I'm trying to create a repeating header much like this one at http://csstreacle.artygirl.co.uk/. Is there a way I can do this in Expression blend. How do I organize the containers? And how do I set it to repeat in code or manually? Any ideas would be really helpful :) I have a rectangle with ...

OCaml: bound expressions v. functions

Here we have a function definition: let f x = x + 3;; Here is an expression: let g = 4;; Could g just be thought of as constant function that takes no arguments? Is there any difference? ...

ANTLR Grammar for expressions

I'm trying to implement a expression handling grammar (that deals with nested parenthesis and stuff). I have the following so far, but they can't deal with some cases (successful/failure cases appear after the following code block). Anyone know what's going on? Note: The varname += and varname = stuff are just some additional AST genera...

JavaScript: split doesn't work in IE???

Is there a reason why the following piece of code doesn't work in IE? While with FF and other sane browsers it splits the string by the given expression, in IE it simply doesn't work. var str = "abc<font id=\"something\">def</font>gh"; alert(str.split(/(\<.*?\>|.)/).length); Thank you. ...

Expression blend click event animation

Hi I'm a newbie at expression blend. I've created a button and added a storyboard animation within it. I've also added a hyperlink behavior. The link works but nothing happens when I hover over it to reveal the animation. Are there any tutorials on how to link hyperlinks with animations? Any ideas would be much appreciated :) Thanks ...

Creating a hyperlink in Expression blend

Hi, I'm trying to create a hyperlink colour change in Expression blend. Is this done using behaviors or is it a styling technique. I'm very new to Expression blend to don't fully understand where things are and the process. Thanks Judi ...